You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Sean Radford <sr...@bladesystems.co.uk> on 2005/05/12 12:14:28 UTC

JDBC PersistenceManager

Hi,

I seem to remeber a message on the list a few weeks back about a JDBC 
PersistenceManager. Anyone know anything about it?

I know about the HibernatePersistenceManager, but that is not JTA aware 
and each 'node action' runs in its own Transaction - and if you make it 
JTA aware (as I have done) you still must use REQUIRES_NEW else you run 
into duplicate persistent objects with hibernate.

I *may* have some time next week to play with a JDBC version, so thought 
I should ask what (if anything) had been done so far.

Regards,

Sean


-- 
Dr. Sean Radford, MBBS, MSc
sradford@bladesystems.co.uk
http://bladesys.demon.co.uk/ 


Re: JDBC PersistenceManager

Posted by Edgar Poce <ed...@gmail.com>.
Hi Sean

Sean Radford wrote:
> If one is using a managed transaction (most probably via the 
> JNDIConnectionFactory should the PM be calling Connection.commit() in 
> the store(ChangeLog) method?
AFAIK JCR transaction support has nothing to do with the PM 
implementation. The JDBC transaction in the store() method is used 
*internally* to ensure data integrity.
PMs are internal components, the responsibilities are well described in 
the javadocs and there are quite a few conversations on this matter in 
the archive.

regards
edgar
> 
> Regards,
> 
> Sean
> 

Re: JDBC PersistenceManager

Posted by Sean Radford <sr...@bladesystems.co.uk>.
Edgar Poce wrote:

> Hi
>
> Sean Radford wrote:
>
>> I seem to remeber a message on the list a few weeks back about a JDBC 
>> PersistenceManager. Anyone know anything about it?
>
> I've just uploaded a few changes. See JCR-91 in JIRA. But it's not 
> ready  for use because:
> ...

Cool. I'll hopefully get to play with it next week.

Just had a tiny peek at the code though, and have one quick question.. 
If one is using a managed transaction (most probably via the 
JNDIConnectionFactory should the PM be calling Connection.commit() in 
the store(ChangeLog) method?

Regards,

Sean

-- 
Dr. Sean Radford, MBBS, MSc
sradford@bladesystems.co.uk
http://bladesys.demon.co.uk/ 


Re: JDBC PersistenceManager

Posted by Edgar Poce <ed...@gmail.com>.
Hi

Sean Radford wrote:
> I seem to remeber a message on the list a few weeks back about a JDBC 
> PersistenceManager. Anyone know anything about it?
I've just uploaded a few changes. See JCR-91 in JIRA. But it's not ready 
  for use because:

1. The PM is called too many times (see 
http://thread.gmane.org/gmane.comp.apache.jackrabbit.devel/1558). It 
makes any implemenentation other than local or cache enabled 
particularly slow.

2. The ChangeLog doesn't provide the changes in the order they were 
made. Changes can be retrieved only by the type (modified, added, 
deleted). This causes that during the process of storing data there are 
moments where the repository is in an inconsistent state. Given this, 
primary keys can't be used to ensure consistency. It shouldn't be 
difficult to patch o.a.j.core.state.ChangeLog.

3. There are a few tests that fail with this implementation. It's 
probably a bug. I only ran the tests agains mysql with key contraints 
and I checked that some failures are due to [2]. I didn't check all 
because I had no time.

 > I *may* have some time next week to play with a JDBC version,
 > so thought
 > I should ask what (if anything) had been done so far.
Any help is appreciated.

regards
edgar