This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes JTA Application Managed EntityManager question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "JTA Application Managed EntityManager question" Watch "JTA Application Managed EntityManager question" New topic

JTA Application Managed EntityManager question

Benoît de Chateauvieux
Ranch Hand

Joined: Aug 10, 2007
Posts: 183
Hi all,

I want to test the use of EntityManager.joinTransaction() in the case of BMT.

I wrote a simple method in my class annotated with @TransactionManagement(TransactionManagementType.BEAN):

I have:

and I got the following error:

Any idea?
Thanks a lot,


SCJP5 | SCBCD5 | SCEA5 Part 1
Shivreet Sekhon

Joined: Jun 27, 2005
Posts: 1
Move the emf.getEmtityManager after the ut.begin()
[ December 11, 2008: Message edited by: Shivreet Sekhon ]

Joined: Jan 05, 2007
Posts: 8
For the EJB, default transaction management type is CONTAINER and default transaction attribute for a business method is REQUIRED. So even though we did not specify transaction attributes in our bean class, defaults took over.

But for Bean manager Transaction as here.... Nothing is specified...???
Hence the Answer.
Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

"sandeepsharma sandeepsharma",
Welcome to the ranch. You may not be aware of the ranch Naming Policy. Please read it carefully and change your name accordingly. Thank you.

Nothing is specified...???

Then, what do you want to say other than what Shivreet Sekhon has already said ? What do you suggest ?

[My Blog]
All roads lead to JavaRanch
wood burning stoves
subject: JTA Application Managed EntityManager question
Similar Threads
How to create a Template for EntityManager in a WebApplication
JTA transaction or resource-local transaction.
Persitence confusion. Please help.
deploying multiple ejb module
Entity manager contains() method