File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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,

Beno�t


SCJP5 | SCBCD5 | SCEA5 Part 1
Shivreet Sekhon
Greenhorn

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

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é
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

"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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTA Application Managed EntityManager question