Return-Path: X-Original-To: apmail-shiro-dev-archive@www.apache.org Delivered-To: apmail-shiro-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 17A44ECD5 for ; Wed, 2 Jan 2013 13:46:15 +0000 (UTC) Received: (qmail 98007 invoked by uid 500); 2 Jan 2013 13:46:15 -0000 Delivered-To: apmail-shiro-dev-archive@shiro.apache.org Received: (qmail 97696 invoked by uid 500); 2 Jan 2013 13:46:13 -0000 Mailing-List: contact dev-help@shiro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shiro.apache.org Delivered-To: mailing list dev@shiro.apache.org Received: (qmail 97652 invoked by uid 99); 2 Jan 2013 13:46:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2013 13:46:12 +0000 Date: Wed, 2 Jan 2013 13:46:12 +0000 (UTC) From: "Mladen Marev (JIRA)" To: dev@shiro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SHIRO-389) Fix OSGI Exports for shiro-ehcache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SHIRO-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13542125#comment-13542125 ] Mladen Marev commented on SHIRO-389: ------------------------------------ We need that, because we will be able to run with ehcache configured manager from shiro.ini and without. If application needs it, it has to add it to OSGi runtime and modify configuration file. Because it is optional it will be loaded only if available. If application does not need shiro-ehcache it just does not add shiro-ehcache bundle to OSGi environment and optional import does not break shiro-core from starting up and initialize successfully. If you use shiro-ehcache and you do not have the import, then initialization fails even if the bundle is available in the OSGi runtime, because classloader does not see the class located in shiro-ehcache bundle. So to summarize it is needed as optional, because shiro-core bundle class loader does not know at startup if ehcache is needed or not. It knows it later (after startup) when it reads configuration file. You say shiro-core has no dependency on shiro-ehcache. You can try this configuration in OSGi environment (example is taken from shiro documentation on session management): [main] cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager securityManager.cacheManager = $cacheManager You will see, how ClassNotFoundException is thrown on initialization even if shiro-ehcache bundle is available and loaded in the OSGi runtime. I hope this info is enough. > Fix OSGI Exports for shiro-ehcache > ---------------------------------- > > Key: SHIRO-389 > URL: https://issues.apache.org/jira/browse/SHIRO-389 > Project: Shiro > Issue Type: Bug > Components: Caching > Affects Versions: 1.2.0, 1.2.1 > Reporter: Chris Geer > Assignee: Les Hazlewood > Fix For: 1.2.2, 1.3.0 > > Attachments: SHIRO_389_core.patch, SHIRO-389.patch > > > Currently the osgi-export in the pom file is org.apache.shiro.ehcache which isn't a valid package. It should be changed to org.apache.shiro.cache.ehcache -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira