This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on Extended Persistence context

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

Such a Persistencecontext is and should be used only in a Stateful Session Bean. Is this statement correct? Does the EJB 3.0 spec dictate like that?
 
Arun Rao
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. That is correct. It on the JPA spec section 5.6.2
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The extend persistence context can be used only from the Stateful Bean.

Regards,
Mihai
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting to try that in a Stateless bean and see what happens. Will do that today!
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jothi

The reason is the extended persistence context can exit only in the statefull benas is because the stale less can not take care of they status.

Regards,
Mihai


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!