Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTA Application Managed EntityManager question

 
Benoît de Chateauvieux
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Shivreet Sekhon
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Move the emf.getEmtityManager after the ut.begin()
[ December 11, 2008: Message edited by: Shivreet Sekhon ]
 
sandeepsharma
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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 ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic