Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Transaction

 
Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an EJB having two methods with different transaction attributes. From Client, I invoke one method and this one internally calls the other method. Which transaction attribute will prevail?
Suppose the second method is in another ejb which is invoked from the first method of the first ejb. What will happen in this case?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is difficlut to comment unless you share woth us the transaction attributes.
 
Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am asking if it is driven by a rule/logic.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The rule.
For e.g. method1 with tx attribute requiresnew calls method2 with attribue required the same thransaction context will be used in method 2 as well.
 
Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the second method is locally called, then the tx attribute of the first method prevails. What about the case when one ejb method invokes a method on a different ejb.
[ September 12, 2003: Message edited by: abhinav srivastava ]
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about the case when one ejb method invokes a method on a different ejb.

No difference, the same rule holds good.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic