Hello,

I'm using the ODMG/PB APIs in the following situations; in each I need to be
able to tell OJB to use a named DataSource (defined in
repository_database.xml) other than the default.  Any help would be
appreciated -

--------------

            Transaction tx = odmg.currentTransaction();
            tx.lock(obj, Transaction.WRITE);

--------------

            db = odmg.getDatabase(null);
            db.deletePersistent(obj);

--------------

            PersistenceBroker broker = ((HasBroker)
odmg.currentTransaction()).getBroker();
            Connection conn = null;
            try {
                conn = broker.serviceConnectionManager().getConnection();
            } catch (LookupException e) {
                e.printStackTrace();
            }

--------------

            // Must mark object as dirty to signal OJB to persist
            Transaction tx = odmg.currentTransaction();
            ((NarrowTransaction)tx).markDirty(obj);

---------------


Thanks!

Alex


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

Reply via email to