4

Sun's Bluperint reference implementation of Pet store is built on the JPA Controller pattern. I find no official EJB blueprints whatsoever.

When should you choose an EJB session bean vs a simple JPA controller? Should / could you use both?

Also, are there any server side validation patterns for both options? I know Java EE 6 has something in this regard, but I'm interested in Java EE 5 patterns for various reasons.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Jan
  • 51
  • 1
  • 2

1 Answers1

2

For the first part of your question, maybe the following links are useful for understanding when to use EJB and JPA and when to use them together:

As for the second part, I assume you're referring to Bean Validation? In Java EE 5 there isn't quite anything like that. What it does have is a system for attaching validators to input fields in the web layer; the JSF validators. This surely is "server side validation".

Community
  • 1
  • 1
Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140