Sreedharan,

What you say is not right. Only the getEnvironment method
of the EJBContext should not be used anymore. I do not know
for weblogic but what I mentionned is right for EJB1.1. Note
that all examples on the transaction chapter of the specifications
for 1.1 get the transaction through the EJBContext and that the
J2EE specifications, which includes EJB 1.1 says, that this is the
best way to obtain the transaction.

However, I just wanted to correct you, and I do not think that
this is that important.

Regards, Loïc

> ----------
> From:         SATHISH Sreedharan[SMTP:[EMAIL PROTECTED]]
> Reply To:     A mailing list for Enterprise JavaBeans development
> Sent:         Thursday, February 08, 2001 11:41
> To:   [EMAIL PROTECTED]
> Subject:      Re: Error while invoking rollback method
>
> hello loic,
>         The initialcontext.getUserTransaction() method which is used to
> get
> the UserTransaction will no more work with Weblogic 5.1 and above coz this
> is specific to EJB 1.0 & Weblogic 5.1 will support only EJB1.1 spec.In the
> EJB 1.1 u have to use the jndi lookUp only and not the
> getUserTransaction()
> method.
>
> > -----Original Message-----
> > From: JCISRP(Chennai)
> > Sent: Thursday, February 08, 2001 3:42 PM
> > To:   SARAVANAKUMAR Velmurugan; SATHISH Sreedharan
> > Subject:      FW: Error while invoking rollback method
> >
> >
> >
> > ----------
> > From:
> > [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> > Sent:         Thursday, February 08, 2001 3:05:39 PM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: Error while invoking rollback method
> > Auto forwarded by a Rule
> >
> > Vinoth,
> >
> > Where is the transaction begining (tx.begin) ? Your lookup looks
> > quite strange too. Anyway, using the EJBContext getUserTransaction
> > method is the recommended way of working for EJBs.
> >
> > Loïc
> >
> > > ----------
> > > From:         Chidambara, Vinoth (CTS)[SMTP:[EMAIL PROTECTED]]
> > > Reply To:     A mailing list for Enterprise JavaBeans development
> > > Sent:         Thursday, February 08, 2001 08:04
> > > To:   [EMAIL PROTECTED]
> > > Subject:      Error while invoking rollback method
> > >
> > > 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".
> > >
> >
> >
> ==========================================================================
> > =
> > 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".
>
> ==========================================================================
> =
> 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".
>

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