Okay, looking at your code it seems like you are not trying to obtain a 
UserTransaction instance in your code (e.g. in your DAO) before trying to 
obtain an instance for Database. If you want to use global transaction 
demarcation (for e.g. 2PC), you will need to do this, i.e. control transaction 
demarcation manually within your environment. Unless you happen to be either 

a) within Spring
b) within an EJB with container managed transactions.

I hope this helps.
Werner

> -----Ursprüngliche Nachricht-----
> Von: João Tiago Guerrinha [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 17. April 2007 17:56
> An: [email protected]
> Betreff: RE: [castor-user] Failed to get an active transaction from J2EE
> transaction manager
> 
> I've already did that, and I can retrieve a UserTransaction.
> 
> Guerrinha
> 
> -----Original Message-----
> From: Werner Guttmann [mailto:[EMAIL PROTECTED]
> Sent: terça-feira, 17 de Abril de 2007 16:52
> To: [email protected]
> Subject: AW: [castor-user] Failed to get an active transaction from J2EE
> transaction manager
> 
> Programmatically by the means of a JNDI lookup, using the name given ?
> 
> Werner
> 
> > -----Ursprüngliche Nachricht-----
> > Von: João Tiago Guerrinha [mailto:[EMAIL PROTECTED]
> > Gesendet: Dienstag, 17. April 2007 17:50
> > An: Werner Guttmann
> > Cc: [email protected]
> > Betreff: RE: [castor-user] Failed to get an active transaction from J2EE
> > transaction manager
> >
> > Hello Werner,
> >
> > Can you tell me how can I do that?
> >
> > BR,
> > Guerrinha
> >
> > -----Original Message-----
> > From: Werner Guttmann [mailto:[EMAIL PROTECTED]
> > Sent: terça-feira, 17 de Abril de 2007 16:24
> > To: [email protected]
> > Subject: AW: [castor-user] Failed to get an active transaction from J2EE
> > transaction manager
> >
> > HI,
> >
> > Have you tried to verify (in plain Java code) that you are able to
> > retrieve a UserTransaction instance from the JNDI name '
> > java:TransactionManager' ?
> >
> > Werner
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: João Tiago Guerrinha [mailto:[EMAIL PROTECTED]
> > > Gesendet: Dienstag, 17. April 2007 15:36
> > > An: [email protected]
> > > Betreff: [castor-user] Failed to get an active transaction from J2EE
> > > transaction manager
> > >
> > > Hello:
> > >
> > > I'm having this problem when trying to getDatabase() from my
> JDOManager.
> > >   org.exolab.castor.jdo.JDOManager] Failed to get an active
> > > transaction       from J2EE transaction manager.
> > >   org.exolab.castor.jdo.PersistenceException: Failed to get an active
> > >   transaction from J2EE transaction manager.
> > >   org.exolab.castor.jdo.JDOManager.getDatabase(JDOManager.java:753)
> > >
> > > My code is this and i'm working on JBoss 4.0.3:
> > >
> > >
> > >   Database      db = null;
> > >
> > >   String jdoConf = CADRedeROBindingImplXDSL.class.getResource("/jdo-
> > > conf.xml").toString();
> > >
> > >       JDOManager.loadConfiguration(jdoConf);
> > >
> > >   JDOManager jdo = JDOManager.createInstance("sapa");
> > >
> > >   db = jdo.getDatabase();
> > >
> > >
> > >
> > > My jdo-conf.xml is:
> > >
> > > <!DOCTYPE databases PUBLIC "-//EXOLAB/Castor JDO Configuration DTD
> > Version
> > > 1.0//EN" "http://castor.exolab.org/jdo-conf.dtd";>
> > > <jdo-conf>
> > >   <database name="sapa" engine="oracle">
> > >           <jndi name="java:OMInterfaceSapa" />
> > >           <mapping href="mappingInterfaceOMSapaSapaFR.xml" />
> > >   </database>
> > >   <transaction-demarcation mode="global">
> > >           <transaction-manager name="jndi">
> > >                   <param name="jndiEnc" value="java:TransactionManager" />
> > >           </transaction-manager>
> > >   </transaction-demarcation>
> > >
> > > </jdo-conf>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe from this list please visit:
> > >
> > >     http://xircles.codehaus.org/manage_email
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to