Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB3.0 book relates JEE5  RSS feed

 
Juan Rolando Prieur-Reza
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, Raghu Kodali and Jonathan Wetherbee,

My question is: does your fine new book relate to JEE5? I ask because we are still on J2EE 1.3 app servers, and the organization stayed away from EJB because of complexity. It would be nice to get help to "leap frog" directly into JEE5; we should consider migrating some of our servlets with JDBC code directly into EJB3.0 EJBs. Any suggestions?

Thanks!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB 3.0 forms part of JEE5, so the book is going to have to relate to it.
 
Jon Wetherbee
author
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John-
While we are focused on EJB 3, we present EJB 3 in the context of Java EE 5, and you will find numerous references to other Java EE 5 APIs and concepts. In particular, we have a chapter on integrating EJB 3 in an end-to-end Java EE application that includes web services (JAX-WS) and JSF forms. We also have a chapter on deployment that discusses EJB 3 (and JPA persistence unit) deployment in the context of a Java EE 5 application deployment.

The migration chapter covers EJB 2.x to 3.0 (please see this thread: EJB 2.0 migration)

EJB 3 does require a Java EE 5 server, and vendors are gearing up their Java EE 5 support now...

Regards,
Jon

[ October 25, 2006: Message edited by: Jon Wetherbee ]
[ October 25, 2006: Message edited by: Jon Wetherbee ]
 
Jon Wetherbee
author
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John-
One more thing. As far as migrating your servlet/JDBC code, the JPA makes this type of thing very convenient. Your servlet, and even your forms, can instantiate and interact with JPA entities directly, through the EntityManager API. Moving to JPA entities provides a much cleaner interaction between your web and your persistence tiers.

Regards,
Jon
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jon Wetherbee:
Hi John-
One more thing. As far as migrating your servlet/JDBC code, the JPA makes this type of thing very convenient. Your servlet, and even your forms, can instantiate and interact with JPA entities directly, through the EntityManager API. Moving to JPA entities provides a much cleaner interaction between your web and your persistence tiers.

Regards,
Jon


Hi Jon,

But it is not advisable, from a design point of view, to instantiate and interact with JPA entities directly from forms, it breaks with the MVC
pattern.

Kind regards,

Gian
 
Anthony Karta
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gian Franco Casula:

But it is not advisable, from a design point of view, to instantiate and interact with JPA entities directly from forms, it breaks with the MVC
pattern.


I guess from forms, we invoke session beans (and the beans will construct JPA entities).

btw, a question pops up in my mind, does it mean we don't use entity beans anymore in ejb 3.0?

thanks
tony
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per the JPA, in EJB3 there are no longer any entity beans. Those are just referred to as entities and are simple POJOs. Here's an extract from that link:

Note that in the Java Persistence API, what used to be called entity beans are now simply called entities

[ October 26, 2006: Message edited by: Jaikiran Pai ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!