It depends on how you call methodB from methodA. If you just call it
like you would any other method. It is executed as a normal method. If
you want a new transaction to be started call the method through the
local or remote interface of that bean.

Jos

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED] On Behalf Of Milind Kulkarni
Sent: vrijdag 4 april 2003 10:40
To: [EMAIL PROTECTED]
Subject: Transaction when calling the different methods within same ejb


Hi All,

I have got an EJB with 2 methods ; say methodA() and methodB().
Transaction attribute for methodA() is "Required"  and  transaction
attribute for
methodB() is "RequiresNew".

We have implemented a logic such that the methodA() calls methodB()
internally. But it seems that even though the transaction attribute for
methodB() is "RequiresNew" new transaction is not started at all - the
same transaction continues.

I have seen that if I put methodB()  in the different EJB then a new
transaction is started.

How do I overcome this problem? Any work-around??

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to