Hello Jair,

OJB ODMG stores each registered Objects in an o.a.ojb.odmg.ObjectEnvelope.
All ObjectEnvelopes are kept in an o.a.ojb.odmg.ObjectEnvelopeTable.
ObjectEnvelopeTable has a public method 
public Enumeration elements();

which returns an Enumeration of all ObjectEnvelopes.

The each OJB ODMG TransactionImpl maintains its own ObjectEnvelopeTable:
    /**
     * the internal table containing all Objects "touched" by this tx and
their
     * respective transactional state
     */
    private ObjectEnvelopeTable objectEnvelopeTable = null;

Currently TransactionImpl does not provide public access to the
ObjectEnvelopeTable. 
So I don't see a way to perform your task without changing OJB code...

cheers,
Thomas

> -----Original Message-----
> From: Jair da Silva Ferreira J�nior [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 28, 2003 12:25 AM
> To: OJB Users List
> Subject: how to get objects locked by a transaction?
> 
> 
> Hello,
>     How can I safely get all objects locked by a transaction 
> using ODMG or broker API?
>     I need this because I want to remove all objects locked 
> by a transaction from the cache. Something like this:
> 
>         .....
>         Iterator lockedObjects=getLockedObjects(transaction);
>         while(lockedObjects.hasNext()){
>             broker.removeFromCache(lockedObjects.next());
>         }
>         .....
>     
> Thanks,
>     Jair Jr
> 


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

Reply via email to