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 Mon, 24 Apr 2006 12:37:58 GMT
Hi Stefan,

> > Since the SharedItemStateManager controls the
> > read/write lock, this means there is no need for
> > locking within Persistence Manager.
> correct. note that the current synchronization
> scheme
> (rwLock in SharedItemStateManager) has evolved all
> along.
> in previous revisions concurrency was controlled by
> synchronizing on the PM instance.

Right. Is it possible in any way that the PM instance
be notified of SharedItemStateManager's #begin(),
#end(), and #cancel() operation? 

Is there any listener interface to implement, or is it
possible for a PM which implements a particular
interface to be notified? 

I've looked at the listener interface which is there
but there is none which allows me to do this.

> >
> > My question is, why would there be a need to keep
> > single db connection in the DB File System and
> > Persistence Manager? Is there a reason beyond
> > concurrency issues?
> >
> > When I read the gmane thread you sent to me, my
> > understanding is the single db connection is there
> due
> > to concurrency issues.
> not quite correct. i am against changing the current
> 'simple' db pm
> approach as i have repeatedly pointed out.
> <quote>
> the goals of the SimpleDbPersistenceManager
> implementation have been,
> as its name suggests, being *simple*, having zero
> deployment requiremnts
> and minimal dependencies. it's predestined to be
> used with embedded
> databases such as e.g. Derby.
> ...
> i wouldn't be against a more elaborate JDBC based PM
> implementation that makes
> use of J2EE infrastructure features such as JNDI
> lookup of the DataSource, etc.
> </quote>
> feel free to contribute a jdbc-based pm that makes
> use of connection pools ;-)
I'll give a shot on my end - when I managed to work it
all out, I'll send you an email :)

> re concurrency and pooled connections:
> the write operations of the jdbc-based pm must occur
> within a single
> db transaction,
> i.e. you can't get a new connection for every write
> operation.
Which is why I am asking if there is any way for PM to
be notified of SharedItemState manager's #begin, #end,
#cancel :)

If there's a way, I have an idea which might make a
JDBC pooled PM work according to JCR specs, fingers



Yahoo! Photos – NEW, now offering a quality print service from just 7p a photo http://uk.photos.yahoo.com

View raw message