jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Satyaputra <f_satyapu...@yahoo.co.uk>
Subject Re: DbFileSystem and SimpleDbPersistenceManager - Connection and PreparedStatement
Date Fri, 21 Apr 2006 11:59:43 GMT
Hi Stefan,

Thanks for the pointer.

Just to check if my understanding is correct, can I
confirm one thing... In JCR spec, threads can read and
attempt to write asynchronously into repository. But
when changes is persisted, the change need to be
applied synchronously (hence the lock file). Am I
correct to say this?

If my understanding is correct, can I closely follow
the behaviour above by doing the following when doing
read and write in DbFileSystem and DB Persistence
Manager? 

1. Reopen new JDBC Connection (or reuse from pool)
2. Set autocommit to false
3. Set transaction isolation to
TRANSACTION_READ_COMMITED
4. Execute all statements required
5. Commit the changes

Is this possible? 

Cheers,

Felix


--- Stefan Guggisberg <stefan.guggisberg@gmail.com>
wrote:

> On 4/19/06, Stefan Guggisberg
> <stefan.guggisberg@gmail.com> wrote:
> > hi felix,
> >
> > these topics have been discussed extensively in
> the dev list.
> > check out e.g.
>
http://thread.gmane.org/gmane.comp.apache.jackrabbit.devel/6166/focus=6172
> 
> sorry, the correct pointer is:
>
http://thread.gmane.org/gmane.comp.apache.jackrabbit.devel/6166/focus=6166
> 
> more pointers:
> http://issues.apache.org/jira/browse/JCR-313
>
http://thread.gmane.org/gmane.comp.apache.jackrabbit.devel/5414/focus=5452
> 
> cheers
> stefan
> 
> >
> > cheers
> > stefan
> >
> > On 4/19/06, Felix Satyaputra
> <f_satyaputra@yahoo.co.uk> wrote:
> > > Hi All,
> > >
> > > I've got a question about DbFileSystem and
> > > SimpleDbPersistenceManager. It seems that these
> two
> > > classes are holding on to the single db
> connection and
> > > the bunch of prepared statement initialised
> during
> > > startup (please correct me if I am wrong).
> > >
> > > Is there a reason behind this? If the database
> > > connection and prepared statements are pooled
> (using
> > > dbcp, for example), would it break any
> compatibility
> > > with the JCR specs?
> > >
> > > If using connection pool would not break JCR
> > > compatibility, isn't it better to just create
> > > connection and prepared statements on the go? We
> then
> > > can configure jdbc url and driver which points
> to
> > > pooled connection like dbcp and proxool. The db
> pool
> > > then can handle reusing connection and prepared
> > > statements.
> > >
> > > Any thoughts are appreciated.
> > >
> > > Cheers,
> > >
> > > Felix
> > >
> > >
> > >
> > >
>
___________________________________________________________
> > > To help you stay safe and secure online, we've
> developed the all new Yahoo! Security Centre.
> http://uk.security.yahoo.com
> > >
> >
> 



		
___________________________________________________________ 
NEW - Yahoo! 360 – Your one place to blog, create, publish and share! http://uk.360.yahoo.com

Mime
View raw message