Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E8B409B9E for ; Thu, 1 Mar 2012 20:04:47 +0000 (UTC) Received: (qmail 65996 invoked by uid 500); 1 Mar 2012 20:04:47 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 65940 invoked by uid 500); 1 Mar 2012 20:04:47 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 65932 invoked by uid 99); 1 Mar 2012 20:04:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 20:04:47 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of julian.reschke@gmx.de designates 213.165.64.22 as permitted sender) Received: from [213.165.64.22] (HELO mailout-de.gmx.net) (213.165.64.22) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 01 Mar 2012 20:04:38 +0000 Received: (qmail invoked by alias); 01 Mar 2012 20:04:17 -0000 Received: from p5DCC2B62.dip.t-dialin.net (EHLO [192.168.178.36]) [93.204.43.98] by mail.gmx.net (mp036) with SMTP; 01 Mar 2012 21:04:17 +0100 X-Authenticated: #1915285 X-Provags-ID: V01U2FsdGVkX1+LgcZ41F+LeTay/uXS+kzyaX6NolhqEt9RiNgc72 Bf7w6OP3NGdniL Message-ID: <4F4FD63D.3000103@gmx.de> Date: Thu, 01 Mar 2012 21:04:13 +0100 From: Julian Reschke User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Jackrabbit Developers Subject: JCR2SPI RepositoryConfig lifecycle Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org Hi, today I spent some time with a caching issue in my RepositoryService, only to find out that the lifecycle of the service is not necessarily the same as the one of the JCR2SPI RepositoryImpl. See public Session login(Credentials credentials, String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException { SessionInfo info = config.getRepositoryService().obtain(credentials, workspaceName); try { if (info instanceof XASessionInfo) { return new XASessionImpl((XASessionInfo) info, this, config); } else { return new SessionImpl(info, this, config); } } catch (RepositoryException ex) { config.getRepositoryService().dispose(info); throw ex; } } So a unless the RepositoryConfig caches the service, a new one will be built for each new JCR session. Is this intentional? In which case we should augment the Javadoc. Best regards, Julian