Hai,

Am using weblogic 5.1.Database sybase sql server.
Trying for BMT(Bean Managed Transaction)
stateless session bean

I got a UserTransaction like this(Am i right)
try{
tx=(UserTransaction)ic.lookup("javax.transaction.UserTransaction");
 a.method1();//which do some database operation
 b.method2();//which do some database operation
tx.commit();
}
catch(Exception e){
 try{
    tx.rollback();
 }
 catch(Exception ex){
   System.out.println("Exception in rollback"+ex);
 }
 System.out.println("Exception in lookup"+e);
}

a.method1()---> succedds in database operation
b.method2()---->throws Exception inorder to rollback

Even though I throw exception in b.method2(),a.method1()
is not rollbacking

Am getting exception like this:

Exception in rollbackjava.lang.IllegalStateException: There is no
transaction associated with this thread
Exception in lookup javax.transaction. TransactionRolledbackException:
Transaction: '963124471576_1' rolled back due to EJB exception:
javax.ejb.EJBException
        at com.bank.bciticorp.BCitiBankBean.deposit(Compiled Code)
        at
com.bank.bciticorp.BCitiBankBeanEOImpl.deposit(BCitiBankBeanEOImpl.ja
va:56)
        at com.bank.bglobal.BGlobalBean.transferSTtoCT(BGlobalBean.java:55)
        at
com.bank.bglobal.BGlobalBeanEOImpl.transferSTtoCT(BGlobalBeanEOImpl.j
ava:56)
        at
com.bank.bglobal.BGlobalBeanEOImpl_WLSkel.invoke(BGlobalBeanEOImpl_WL

Anyone help in this regard.
Thanks in advance.
Regards,
Vinoth.C

This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.

                Visit us at http://www.cognizant.com

===========================================================================
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