Thank you, Armin.

I am using TxManagerFactory.instance().getCurrentTransaction() now.

--Bill.

----- Original Message ----- 
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 03, 2003 1:05 AM
Subject: Re: PersistenceBrokerAware and current transaction


> Hi Bill,
> 
> ----- Original Message -----
> From: "V.B. Skrypnyk" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Monday, March 03, 2003 7:28 AM
> Subject: PersistenceBrokerAware and current transaction
> 
> 
> > Hi,
> >
> > I am trying to implement my own cascading deletes of sorts through
> > PersistenceBrokerAware beforeDelete callback. Strangely (?) I can't
> seem to
> > get the current transaction by calling:
> >
> > OJB.getInstance().currentTransaction()
> 
> OJB isn't a singleton, thus when calling
> OJB.getInstance()
> you will get a new Implementation instance.
> 
> regards,
> Armin
> 
> >
> > so that I can add the affected dependent objects to it (so it may be
> saved).
> > I get the following exception:
> >
> >  [java] org.odmg.DatabaseClosedException: Database is NULL, must have
> a DB
> > in order to create a transaction
> >
> > Is this correct behaviour? It's the same thread, shouldn't I be able
> to
> > retrieve the current transaction?
> >
> > Cheers,
> > --Bill.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to