Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 95831 invoked from network); 10 Jun 2010 10:47:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Jun 2010 10:47:31 -0000 Received: (qmail 10031 invoked by uid 500); 10 Jun 2010 10:47:30 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 9905 invoked by uid 500); 10 Jun 2010 10:47:28 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 9896 invoked by uid 99); 10 Jun 2010 10:47:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jun 2010 10:47:27 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vipullalan@gmail.com designates 209.85.212.42 as permitted sender) Received: from [209.85.212.42] (HELO mail-vw0-f42.google.com) (209.85.212.42) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jun 2010 10:47:21 +0000 Received: by vws13 with SMTP id 13so88953vws.1 for ; Thu, 10 Jun 2010 03:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=X/Mb/yT4ACsnGSQ6gU/0poAs/In3kHfkmThmg9T5PSg=; b=e9tcxzPUB3M0TpCoPwfur2F3ow3SWHtRlSAk3RsJ3HMj6xPlrxKL6icvjqz2lBIsew YK59cOzcmgDp2I9CP3Ik6uTf1OSLE+vL9/zZMBv1tLXY4Z6HTnO3ZsITAj6VlTIiKsRy j3qfYCbIrqAHkISCweSSBad/+MA6bjeOJA6is= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=tZPqPxusspFkVQbK21ddgxI3/EoUD7/PE6XBKrdfFNgrvwpcELxQCm6fEbgA5Fw/O3 lIY5gApw6V+4a4QvztVXTd5Z1XRsq0CKHYCmGd/K0WZhIZ3qE2Tp1B+i+Hjl04lNpj8c Wega6zZI64CnmTS+m91J3T9F+s7arJS0/dO2c= MIME-Version: 1.0 Received: by 10.224.72.34 with SMTP id k34mr3526071qaj.283.1276166819842; Thu, 10 Jun 2010 03:46:59 -0700 (PDT) Received: by 10.229.250.195 with HTTP; Thu, 10 Jun 2010 03:46:59 -0700 (PDT) In-Reply-To: References: Date: Thu, 10 Jun 2010 16:16:59 +0530 Message-ID: Subject: Re: asynchronous EventListener - session has been closed From: Vipul To: users@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=00c09f9b09fef88fb40488aabde8 --00c09f9b09fef88fb40488aabde8 Content-Type: text/plain; charset=ISO-8859-1 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 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? > --00c09f9b09fef88fb40488aabde8--