jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vipul <vipulla...@gmail.com>
Subject Re: asynchronous EventListener - session has been closed
Date Thu, 10 Jun 2010 10:46:59 GMT
Hi,
You can try creating a Singleton session at server end that would register
the event listener and do the image processing.
We are also working on achieving this thing.



On Thu, Jun 10, 2010 at 3:28 PM, danisevsky <danisevsky@gmail.com> wrote:

> Hello,
> I want to build a wicket (brix) photo gallery with jackrabbit backend. This
> gallery automatically creates different size images whenever an image is
> uploaded. For instance, you upload an image, and it will create a
> thumbnail,
> a mid-size preview, a larger image, and of course still store the original.
> Or it may watermark images.
>
> So I added EventListener:
>
> session.getWorkspace().getObservationManager().addEventListener(listener,..
>
> and this EventListener creates thumbnails after image upload.
>
> Here's my problem: EventListener creates only one (sometimes none) of three
> thumbnails and then throws javax.jcr.RepositoryException: this session has
> been closed.
>
> because my wicket application close all alive sessions on the end of
> request
> cycle and EventListener is asynchronous. Synchronous event listener is not
> part of jcr API and in addition I read that synchronous event listener
> should never write to the repository using the same session that was used
> to
> create it.
> Could someone give me a advice what is the best way to solve it?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message