On 4/24/06, Felix Satyaputra <[EMAIL PROTECTED]> wrote:
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?

why would you need that?


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 :)

have a look at DatabasePersistenceManager's implementation
of PersistenceManager#store(ChangeLog). that's the hook
you're looking for...

cheers
stefan


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

Cheers,

Felix





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

Reply via email to