jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giota Karadimitriou" <Giota.Karadimitr...@eurodyn.com>
Subject RE: question reagrding JNDI datasource
Date Wed, 14 Jun 2006 12:18:07 GMT
Hello,

I would just like to report that it is not feasible to use datasource
with JCA and this because of line 339 in DatabasePersistenceManager
which performs an explicit con.commit();

I use OC4J and I get a 2-phase commit exception

14/06/2006_8] ERROR
org.apache.jackrabbit.core.state.db.DatabasePersistenceManager -
committing change log failed
java.sql.SQLException: Calling commit() on a Connection is not allowed
during a global transaction.
	at
com.evermind.sql.OrionCMTConnection.commit(OrionCMTConnection.java:523)
	at
com.evermind.sql.ConnectionBCELProxy.commit(ConnectionBCELProxy.java:136
)
	at
org.apache.jackrabbit.core.state.db.DatabasePersistenceManager.store(Dat
abasePersistenceManager.java:339)
	at
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(Share
dItemStateManager.java:627)
	at
org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateMa
nager.java:170)
	at
org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.
java:172)
	at
org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:324)
	at
com.evermind.server.OrionTwoPhaseCommitDriver.commitResource(OrionTwoPha
seCommitDriver.java:241)
	...
 Transaction was rolled back: TwoPhase Commit failed; nested exception
is: 
	javax.transaction.xa.XAException
com.ed.ecomm.edcore.exception.RepException: Transaction was rolled back:
TwoPhase Commit failed; nested exception is: 
	javax.transaction.xa.XAException
	at
com.ed.ecomm.edcore.delegates.CommonDelegate.invoke(CommonDelegate.java:
127)
...

> -----Original Message-----
> From: Giota Karadimitriou [mailto:Giota.Karadimitriou@eurodyn.com]
> Sent: Tuesday, June 13, 2006 12:16 PM
> To: dev@jackrabbit.apache.org
> Subject: RE: question reagrding JNDI datasource
> 
> Thank you for your comments; they helped me a lot.
> 
> I am using jackrabbit as RAR using jca (deployment model 2) so that
> transactions are handled by the application server. Has anybody tried
to
> use a datasource from within the RAR?
> 
> I am trying to find out how to configure the reference to the
datasource
> from the connector module. If somebody already did this could you tell
> me how? I will post my feedback to the list when I find out how to do
> this.
> 
> Thanks
> 
> Giota
> 
> > Connector module> -----Original Message-----
> > From: Jukka Zitting [mailto:jukka.zitting@gmail.com]
> > Sent: Saturday, June 10, 2006 10:40 AM
> > To: dev@jackrabbit.apache.org
> > Subject: Re: question reagrding JNDI datasource
> >
> > Hi,
> >
> > On 6/9/06, Giota Karadimitriou <Giota.Karadimitriou@eurodyn.com>
> wrote:
> > > Does this mean DatabasePersistenceManager closes the statements
and
> > > creates new ones when the next store occurs like Marcel observed?
> >
> > No. The Javadoc warning I mentioned is:
> >
> >  * <strong>WARNING:</strong> The acquired database connection is
kept
> >  * for the entire lifetime of the persistence manager instance. The
> >  * configured data source should be prepared for this.
> >
> > The persistence manager still keeps the prepared statements over its
> > entire lifetime.
> >
> > > 2) So in order to support Datasource I just have to replace
> > > SimpleDbPersistenceManager with DatabasePersistenceManager and
> > > put a <param name="dataSource" value="jdbc/JackrabbitDS"/>
> >
> > The DatabasePersistenceManager is an abstract base class for both
> > SimpleDbPersistenceManager and JNDIDatabasePersistenceManager. Use
the
> > JNDIDatabasePersistenceManager for accessing a JNDI-bound data
source.
> > The configuration parameter to use is:
> >
> >     <param name="dataSourceLocation" value="jdbc/JackrabbitDS"/>
> >
> > > 3) Can I use DatabasePersistenceManager with LocalFileSystem like
> with
> > > SimpleDBPersistenceManager?
> >
> > Yes.
> >
> > > 4) Something final; I just took jackrabbit 1.0.1 and these files
are
> not
> > > in there. I can take them fro trunk but why they were not included
> in
> > > 1.0.1? Aren't they considered stable enough?
> >
> > 1.0.1 was planned to be a bug fix -only release with no new features
> > like the JNDIDatabasePersistenceManager. The new persistence manager
> > will be included in the 1.1 release planned for this summer.
> >
> > BR,
> >
> > Jukka Zitting
> >
> > --
> > Yukatan - http://yukatan.fi/ - info@yukatan.fi
> > Software craftsmanship, JCR consulting, and Java development



Mime
View raw message