File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 14688

"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
subject: JTA Application Managed EntityManager question
It's not a secret anymore!