jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: FW: jta transaction without using jca
Date Fri, 06 Oct 2006 12:33:31 GMT
On 10/6/06, Magnus Grimsell <magnus.grimsell@idainfront.se> wrote:
> Thanks for your quick reply.
>
> In what way does it violate the contract?
> Should the PersistenceManager suspend the ongoing transaction and start it's own?

a PersistenceManager's store operations are expected to either succeed or fail
by throwing an exception, i.e. if the store operation succeeds it is
assumed that the
data has been actually persisted. the PM is at the very bottom layer
in jackrabbit's
current core architecture. if a global transaction is rolled back you
would also have
to update internal structures and caches of jackrabbit.

>
> > -----Original Message-----
> > From: Stefan Guggisberg [mailto:stefan.guggisberg@gmail.com]
> > Sent: Friday, October 06, 2006 2:02 PM
> > To: dev@jackrabbit.apache.org
> > Subject: Re: FW: jta transaction without using jca
> >
> >
> > On 10/6/06, Magnus Grimsell <magnus.grimsell@idainfront.se> wrote:
> > > I sent this to the user list but didn't get any response so
> > I try the dev list :)
> > >
> > > I rewrote JNDIDatabasePersistenceManager a little bit so it
> > doesn't do it's own commits.
> > > This works fine and persistence manager and file system now
> > participates in the gloabl transaction.
> > > If there is any interest I can send a patch with this
> > behaviour optional.
> >
> > this behaviour does violate the contract of the
> > PersistenceManager interface and
> > almost certainly leads to inconsistent internal repository state when
> > such a global transaction is rolled back.
> >
> > cheers
> > stefan
> >
> > >
> > > I guess the problem left is the search index which is
> > stored on disc. I've used Compass in a recent project
> > > and it stores the lucene index in the database. Is there
> > any plans for jackrabbit to support that too?
> > >
> > > /Magnus
> > >
> > > > -----Original Message-----
> > > > From: Magnus Grimsell [mailto:magnus.grimsell@idainfront.se]
> > > > Sent: Monday, October 02, 2006 11:03 AM
> > > > To: users@jackrabbit.apache.org
> > > > Subject: jta transaction without using jca
> > > >
> > > >
> > > > I would like to configure jackrabbit with db based file
> > > > system and persistence manager that participates in the
> > > > ongoing jta transaction.
> > > > I tried out the JNDIDatabasePersistenceManager but since it
> > > > does explicit commits i ran into trouble.
> > > >
> > > > Caused by: java.sql.SQLException: The method 'commit' cant be
> > > > called when a global transaction is active.
> > > >       at
> > > > oracle.oc4j.sql.spi.ConnectionHandle.oc4j_throwSQLExceptionIfG
> > > > lobalTxActive(ConnectionHandle.java:407)
> > > >       at
> > > >
> > oracle.oc4j.sql.spi.ConnectionHandle.commit(ConnectionHandle.java:122)
> > > >       at
> > > > org.apache.jackrabbit.core.state.db.DatabasePersistenceManager
> > > > .store(DatabasePersistenceManager.java:339)
> > > >
> > > > I've read that you are supposed to use JCA to enable
> > > > jackrabbit to participate in JTA transactions. However, since
> > > > our product must
> > > > work on a bunch of different application servers I'm a little
> > > > hesitant to introduce this new requirement.
> > > >
> > > > Has anybody used JTA and jackrabbit without using JCA?
> > > >
> > > > Magnus Grimsell
> > > > magnus.grimsell@idainfront.se
> > > >
> > >
> >
>

Mime
View raw message