You can call setTransactionManager(String jndiNameOfTransactionManagerInYourJ2EEServer) on the JDO object. Typically you would do this on a JDO instance that itself would then be registered in JNDI for use by your app.

You would then manage the transactions in castor using a UserTransaction obtained from the TransactionManager managing JDO.

UserTransaction ut = ( UserTransaction ) ic.lookup( "java/utJndiAddress" );
DataObjects jdo jdo = ( DataObjects ) ic.lookup( "java/jdoJndiAddressOfJDOInstanceUponWhichYouHaveSetTransactionManagerAbove" ); ut.begin()
Database db = jdo.getDatabase(); //...do your stuff ut.commit();
return data;


Note that you must begin your tranny before you get the Database from the DataObject.

Hope this helps.

Patrick


Venkat Dosapati wrote:


hi all,

Can I use JTA & JTS compliant Transaction Manager & XA-compliant connection
pool
with Castor JDO. where can set the configuration to use them.

In my case I want to use JOTM [TransactionManager] & XAPool [XA resource
pool]
with Castor JDO.

Did anyone try this?

thanks
Venkat

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to