db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janet Song" <...@silicomp.com.sg>
Subject Re: Database Rollback in WLS
Date Mon, 21 Apr 2003 02:01:20 GMT
Thx! here goes...

      try {
        broker = getBroker();
        broker.beginTransaction();
        .....
        broker.store(testObject);
        broker.commitTransaction();
      } catch(PersistenceBrokerException pbe) {
        if(broker != null)
        {
          // rollback in case of errors
          broker.abortTransaction();
          broker.clearCache();
          broker.close();
        }
        pbe.printStackTrace();
      } catch(Exception e) {
        if(broker != null)
        {
          // rollback in case of errors
          broker.abortTransaction();
          broker.clearCache();
          broker.close();
        }
        e.printStackTrace();
      } catch (Throwable t)   {
        if(broker != null)
        {
         // rollback in case of errors
          broker.abortTransaction();
          broker.clearCache();
          broker.close();
        }
        t.printStackTrace();
      } finally {
        if(broker != null)  {
          broker.close();
        }
      }

----- Original Message ----- 
From: "Armin Waibel" <armin.waibel@code-au-lait.de>
To: "OJB Developers List" <ojb-dev@db.apache.org>
Sent: Thursday, April 17, 2003 18:12
Subject: Re: Database Rollback in WLS


> Hi Janet,
> 
> could you post a code snip?
> Seems like a problem with PB-tx.
> 
> regards,
> Armin
> 
> ----- Original Message -----
> From: "Janet Song" <spy@silicomp.com.sg>
> To: "OJB Developers List" <ojb-dev@db.apache.org>;
> <ojb-user@db.apache.org>
> Sent: Thursday, April 17, 2003 12:05 PM
> Subject: Database Rollback in WLS
> 
> 
> > Hi,
> >
> > I'm using EJB with OJB deployed on Weblogic Server 7.0. I have this
> problem:
> >
> > After i do a rollback with the PersistenceBroker.abortTransaction()
> when the
> > db transaction fails, the next time i invoke the update on the same
> table
> > with the correct fields (fields for a successful DB transaction), i am
> not
> > able to proceed anymore. This is the exception that i get continuously
> > regardless of correct or wrong input data.
> >
> > <Apr 17, 2003 5:59:06 PM SGT> <Info> <EJB> <010051> <EJB
Exception
> during
> > invocation from home:
> com.fedex.cih.ejb.ShipmentBean_6ssy2e_HomeImpl@29642c
> > threw exception:
> org.apache.ojb.broker.TransactionNotInProgressException:
> > ConnectionManager is NOT in transaction
> > org.apache.ojb.broker.TransactionNotInProgressException:
> ConnectionManager
> > is NOT in transaction
> >         at
> >
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.abortTransaction(Un
> know
> > n Source)
> >         at
> >
> org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.abortTransact
> ion(
> > Unknown Source)
> >         at com.fedex.cih.ejb.ShipmentBean.setMDEDetails(Unknown
> Source)
> >         at
> >
> com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl.setMDEDetails(ShipmentBean_
> 6ssy
> > 2e_EOImpl.java:98)
> >         at
> > com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl_WLSkel.invoke(Unknown
> Source)
> >         at
> > weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
> >         at
> > weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
> >         at
> >
> weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceMa
> nage
> > r.java:821)
> >         at
> >
> weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:3
> 08)
> >         at
> >
> weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.ja
> va:3
> > 0)
> >         at
> weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
> >         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
> > >
> > <Apr 17, 2003 6:02:31 PM SGT> <Info> <Management> <140009>
> <Configuration
> > changes for domain saved to the repository.>
> >
> >
> > I tried clearing the cache with the clearCache() but no change. Any
> help is
> > appreciated.
> >
> > regards,
> >
> > Janet
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-dev-help@db.apache.org
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 



Mime
View raw message