Christophe,
as you are using WebSphere 4, did you instruct Castor about the fact that you are deploying your application on a web/ejb container and that you want to use container-managed transactions. All this can be done by calling
JDO.setTransactionManager()
and providing the JNDI ENC of the transaction manager.
If you have not done so, the TransactionNotInProgressException signals that a transactrion has not been started yet, and Castor requires a transaction in progress before you can create/load/update objects. This can either be achieved by starting a (local) transaction manually (Database.begin()), running your ejb app with container-managed transactions enabled or using the UserTransaction interface to control transaction demarcation yourself.
I hope this helps ...
Werner
--Original Message Text---
From: Christophe Frey
Date: Tue, 9 Sep 2003 22:51:59 +0200 (CEST)
I'm trying to test castor with websphere 4 and I can't make it work in my
container manage transaction. I've create a new Datasource test
in my whebsphere instance, when in test it directly it works fine.
Now when I try to associate use it with castor the problem begin :o(
First I have create my database an mapping file.
My database file contains an element jndi with
the name of the jndi name of the datasource for attribute.
When I try to create a new Object in my database the method
DatabaseImpl.getTransaction throw a
TransactionNotInProgressException ????
Did I make something wrong ???? (My transaction is container manage ...)
It works fine when I use directly the datasource !!!!!!!
The BD is an Oracle 8i instance.
The datasource is a oracle.jdbc.pool.OracleConnectionPoolDataSource class.
Thanks to help me.
Christophe Frey
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Testez le nouveau Yahoo! Mail
- [castor-dev] websphere, datasource, jndi and castor = Tran... Christophe Frey
- Re: [castor-dev] websphere, datasource, jndi and cast... Werner Guttmann
- Re: [castor-dev] websphere, datasource, jndi and ... Christophe Frey
- Re: [castor-dev] websphere, datasource, jndi and cast... Werner Guttmann
- Re: [castor-dev] websphere, datasource, jndi and ... Christophe Frey
- Re: [castor-dev] websphere, datasource, jndi and cast... Werner Guttmann
- Re: [castor-dev] websphere, datasource, jndi and ... Christophe Frey
- [castor-dev] Velcocity and Castor Deepak A N
- Re: [castor-dev] Velcocity and Castor Bruce Snyder
- Re: [castor-dev] websphere, datasource, jndi and cast... Werner Guttmann
- Re: [castor-dev] websphere, datasource, jndi and ... Christophe Frey
