You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Carter Page <ca...@carterpage.net> on 2009/03/12 12:25:50 UTC

data consistency problems with session pooling

I have enabled session pooling in my application using the Apache Commons
GenericObjectPool to improve performance issues I was encountering.  (Here
are the details of my pooling
implementation:http://www.jroller.com/IllegalArgumentException/entry/pooling_jcr_sessions
).

Now it works great from a performance standpoint, but it isn't reflecting
data changes that I am making to the repository through another source,
namely WebDAV.  I've been stepping through the source code for JR and
haven't been able to figure it out.  (If I shrink the pool idle size down to
0 it works fine, since it forces a logout/login.)

I've tried session.refresh(false) to no avail.

Any help would be greatly appreciated and attributed.

Thanks,
Carter

Re: data consistency problems with session pooling

Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, Mar 12, 2009 at 12:25 PM, Carter Page <ca...@carterpage.net> wrote:
> I have enabled session pooling in my application using the Apache Commons
> GenericObjectPool to improve performance issues I was encountering.  (Here
> are the details of my pooling
> implementation:http://www.jroller.com/IllegalArgumentException/entry/pooling_jcr_sessions
> ).
>
> Now it works great from a performance standpoint, but it isn't reflecting
> data changes that I am making to the repository through another source,
> namely WebDAV.  I've been stepping through the source code for JR and
> haven't been able to figure it out.  (If I shrink the pool idle size down to
> 0 it works fine, since it forces a logout/login.)
>
> I've tried session.refresh(false) to no avail.
>
> Any help would be greatly appreciated and attributed.

Not easy to guess, so far. I think more information is required.

What version of Jackrabbit are you using? What is your configuration
and use cases (persistence manager, usage of versioning, usage of
transactions, etc.)?

Also, what were the performance issues you encountered? In general,
sessions should be really cheap to create in Jackrabbit, so that
pooling is not required.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: data consistency problems with session pooling

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Thu, Mar 12, 2009 at 12:25 PM, Carter Page <ca...@carterpage.net> wrote:
> Now it works great from a performance standpoint, but it isn't reflecting
> data changes that I am making to the repository through another source,
> namely WebDAV.

I notice you create the repository like this:

    private synchronized Repository getRepository() {
	if (repository == null) {
	    try {
		repository = new TransientRepository(config, home);
	    } catch (IOException e) {
		throw new RuntimeException(e);
	    }
	}
	    return repository;
    }

Is this the same Repository instance as you use when storing files
over WebDAV? Note that (unless you have a clustering setup) you can
only have a single Repository instance accessing the repository
content.

BR,

Jukka Zitting