aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes application managed persistence context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "application managed persistence context" Watch "application managed persistence context" New topic
Author

application managed persistence context

Goran Markovic
Ranch Hand

Joined: Sep 26, 2008
Posts: 399
Hi
In every book I have read it have been written that application managed persistence context can be performed only in Stateful session beans. Is that correct?
I mean, you cannot span entity manager through multiple method of Stateless bean, or you can???
Well I thought that you can,. but I found this in ejb3_persistent_spec.

Considering this statement it mean that Stateless beans cannot be used, because they cannot be used in extended scope, right???
and then I found this piece of code, I believed that it could exists only in Stateful bean


Please, does anyone could clarified my doubts about this issue?
thanks
Abraham Gimeno
Greenhorn

Joined: Jul 16, 2008
Posts: 7

You can use an application-managed Entity Manager to gain more control over the transactions or the EM lifecycle.The container do the work transparently but this doesn't mean you can not interfere in it.

What it is doing the code you posted is basically the same it occurs at the background using a container-managed EM.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: application managed persistence context
 
Similar Threads
MZs Notes - Pg 159
Passed SCBCD 5.0 :)
Persitence confusion. Please help.
Application managed EntityManagers with transactions.
Difference between Container-managed and Application - managed EntityManager