• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

StateLess SessionBean - Transaction (CMT)

 
KasiMurugan Ramasamy
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,

I have a doubt. Method A is Called in a transaction(Remote method). Method A in turn calls Method B(May be private method) in the same bean. My question is, Does the Method B participate a transaction which is started for the Method A?.
 
Ugender Rekulampally
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
KasiMurugan,
Yes and No.
I am assuming you are asking that B will be in A's transaction context.

it depends on what is the transaction attribute for method B. If method B has 'required', 'supports' then you are correct.

But, if method B has 'requiresNew', 'notSupported' then it won't participate in A 's transaction.

the remaining two attributes are 'mandatory' and 'never'

in this case 'mandatory' goes along with first group (required, supports) since we are assuming there is a transaction context for method A.

and 'never' is going to throw an exception since method A has a valid transaction context.

Hope this helps.

Ugender
[ August 24, 2006: Message edited by: Ugender Rekulampally ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic