Thanks to answer so quickly !!!!
But I don't understand how it should work.
1. The datasource that I look up is already associate
with a Transaction so why must I register the JDO
with the transaction
2 . How can I know the jndi name of my container
manage transaction in Websphere 4 (I don't even
know that such a thing was possible for a
container manage transaction :o( )
Thanks
Christophe
Werner Guttmann <[EMAIL PROTECTED]> wrote:
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>
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Testez le nouveau Yahoo! Mail
