Return-Path: X-Original-To: apmail-jspwiki-commits-archive@www.apache.org Delivered-To: apmail-jspwiki-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 035CA11976 for ; Sun, 20 Apr 2014 21:29:26 +0000 (UTC) Received: (qmail 30127 invoked by uid 500); 20 Apr 2014 21:29:26 -0000 Delivered-To: apmail-jspwiki-commits-archive@jspwiki.apache.org Received: (qmail 30103 invoked by uid 500); 20 Apr 2014 21:29:25 -0000 Mailing-List: contact commits-help@jspwiki.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jspwiki.apache.org Delivered-To: mailing list commits@jspwiki.apache.org Received: (qmail 30096 invoked by uid 99); 20 Apr 2014 21:29:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Apr 2014 21:29:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Apr 2014 21:29:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 585B82388999; Sun, 20 Apr 2014 21:29:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1588836 - in /jspwiki/trunk: ./ jspwiki-war/src/main/java/org/apache/wiki/ jspwiki-war/src/main/java/org/apache/wiki/attachment/ jspwiki-war/src/main/java/org/apache/wiki/providers/ jspwiki-war/src/main/java/org/apache/wiki/render/ jspwiki... Date: Sun, 20 Apr 2014 21:29:03 -0000 To: commits@jspwiki.apache.org From: juanpablo@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140420212903.585B82388999@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: juanpablo Date: Sun Apr 20 21:29:02 2014 New Revision: 1588836 URL: http://svn.apache.org/r1588836 Log: * 2.10.1-svn-14 * Fixed JSPWIKI-832 - [Portable] Problems setting up multiple wikis using a shared JSPWiki libraries (patch by Siegfried Goeschl - thanks!) Modified: jspwiki/trunk/ChangeLog jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/render/RenderingManager.java jspwiki/trunk/jspwiki-war/src/main/resources/ehcache.xml Modified: jspwiki/trunk/ChangeLog URL: http://svn.apache.org/viewvc/jspwiki/trunk/ChangeLog?rev=1588836&r1=1588835&r2=1588836&view=diff ============================================================================== --- jspwiki/trunk/ChangeLog (original) +++ jspwiki/trunk/ChangeLog Sun Apr 20 21:29:02 2014 @@ -1,3 +1,10 @@ +2014-04-20 Juan Pablo Santos (juanpablo AT apache DOT org) + + * 2.10.1-svn-14 + + * Fixed JSPWIKI-832 - [Portable] Problems setting up multiple wikis using a shared JSPWiki libraries + (patch by Siegfried Goeschl - thanks!) + 2014-04-01 Harry Metske (metskem@apache.org) * 2.10.1-svn-13 Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java?rev=1588836&r1=1588835&r2=1588836&view=diff ============================================================================== --- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java (original) +++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java Sun Apr 20 21:29:02 2014 @@ -72,7 +72,7 @@ public final class Release { *

* If the build identifier is empty, it is not added. */ - public static final String BUILD = "13"; + public static final String BUILD = "14"; /** * This is the generic version string you should use when printing out the version. It is of Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java?rev=1588836&r1=1588835&r2=1588836&view=diff ============================================================================== --- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java (original) +++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java Sun Apr 20 21:29:02 2014 @@ -137,12 +137,13 @@ public class AttachmentManager // // Create and initialize the provider. // + String cacheName = engine.getApplicationName() + "." + CACHE_NAME; try { - if (m_cacheManager.cacheExists(CACHE_NAME)) { - m_dynamicAttachments = m_cacheManager.getCache(CACHE_NAME); + if (m_cacheManager.cacheExists(cacheName)) { + m_dynamicAttachments = m_cacheManager.getCache(cacheName); } else { - log.info("cache with name " + CACHE_NAME + " not found in ehcache.xml, creating it with defaults."); - m_dynamicAttachments = new Cache(CACHE_NAME, DEFAULT_CACHECAPACITY, false, false, 0, 0); + log.info("cache with name " + cacheName + " not found in ehcache.xml, creating it with defaults."); + m_dynamicAttachments = new Cache(cacheName, DEFAULT_CACHECAPACITY, false, false, 0, 0); m_cacheManager.addCache(m_dynamicAttachments); } Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java?rev=1588836&r1=1588835&r2=1588836&view=diff ============================================================================== --- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java (original) +++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java Sun Apr 20 21:29:02 2014 @@ -94,23 +94,24 @@ public class CachingAttachmentProvider { log.info("Initing CachingAttachmentProvider"); - if (m_cacheManager.cacheExists(ATTCOLLCACHE_NAME)) { - m_cache = m_cacheManager.getCache(ATTCOLLCACHE_NAME); + String attCollCacheName = engine.getApplicationName() + "." + ATTCOLLCACHE_NAME; + if (m_cacheManager.cacheExists(attCollCacheName)) { + m_cache = m_cacheManager.getCache(attCollCacheName); } else { - m_cache = new Cache(ATTCOLLCACHE_NAME, m_capacity, false, false, 0, 0); + m_cache = new Cache(attCollCacheName, m_capacity, false, false, 0, 0); m_cacheManager.addCache(m_cache); } // // cache for the individual Attachment objects, attachment name is key, the Attachment object is the cached object // - if (m_cacheManager.cacheExists(ATTCACHE_NAME)) { - m_attCache = m_cacheManager.getCache(ATTCACHE_NAME); + String attCacheName = engine.getApplicationName() + "." + ATTCACHE_NAME; + if (m_cacheManager.cacheExists(attCacheName)) { + m_attCache = m_cacheManager.getCache(attCacheName); } else { - m_attCache = new Cache(ATTCACHE_NAME, m_capacity, false, false, 0, 0); + m_attCache = new Cache(attCacheName, m_capacity, false, false, 0, 0); m_cacheManager.addCache(m_attCache); } - // // Find and initialize real provider. // Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java?rev=1588836&r1=1588835&r2=1588836&view=diff ============================================================================== --- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java (original) +++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java Sun Apr 20 21:29:02 2014 @@ -100,27 +100,30 @@ public class CachingProvider implements // engine is used for getting the search engine m_engine = engine; - if (m_cacheManager.cacheExists(CACHE_NAME)) { - m_cache = m_cacheManager.getCache(CACHE_NAME); + String cacheName = engine.getApplicationName() + "." + CACHE_NAME; + if (m_cacheManager.cacheExists(cacheName)) { + m_cache = m_cacheManager.getCache(cacheName); } else { - log.info("cache with name " + CACHE_NAME + " not found in ehcache.xml, creating it with defaults."); - m_cache = new Cache(CACHE_NAME, DEFAULT_CACHECAPACITY, false, false, 0, 0); + log.info("cache with name " + cacheName + " not found in ehcache.xml, creating it with defaults."); + m_cache = new Cache(cacheName, DEFAULT_CACHECAPACITY, false, false, 0, 0); m_cacheManager.addCache(m_cache); } - if (m_cacheManager.cacheExists(TEXTCACHE_NAME)) { - m_textCache= m_cacheManager.getCache(TEXTCACHE_NAME); + String textCacheName = engine.getApplicationName() + "." + TEXTCACHE_NAME; + if (m_cacheManager.cacheExists(textCacheName)) { + m_textCache= m_cacheManager.getCache(textCacheName); } else { - log.info("cache with name " + TEXTCACHE_NAME + " not found in ehcache.xml, creating it with defaults."); - m_textCache = new Cache(TEXTCACHE_NAME, DEFAULT_CACHECAPACITY, false, false, 0, 0); + log.info("cache with name " + textCacheName + " not found in ehcache.xml, creating it with defaults."); + m_textCache = new Cache(textCacheName, DEFAULT_CACHECAPACITY, false, false, 0, 0); m_cacheManager.addCache(m_textCache); } - if (m_cacheManager.cacheExists(HISTORYCACHE_NAME)) { - m_historyCache= m_cacheManager.getCache(HISTORYCACHE_NAME); + String historyCacheName = engine.getApplicationName() + "." + HISTORYCACHE_NAME; + if (m_cacheManager.cacheExists(historyCacheName)) { + m_historyCache= m_cacheManager.getCache(historyCacheName); } else { - log.info("cache with name " + HISTORYCACHE_NAME + " not found in ehcache.xml, creating it with defaults."); - m_historyCache = new Cache(HISTORYCACHE_NAME, DEFAULT_CACHECAPACITY, false, false, 0, 0); + log.info("cache with name " + historyCacheName + " not found in ehcache.xml, creating it with defaults."); + m_historyCache = new Cache(historyCacheName, DEFAULT_CACHECAPACITY, false, false, 0, 0); m_cacheManager.addCache(m_historyCache); } Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/render/RenderingManager.java URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/render/RenderingManager.java?rev=1588836&r1=1588835&r2=1588836&view=diff ============================================================================== --- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/render/RenderingManager.java (original) +++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/render/RenderingManager.java Sun Apr 20 21:29:02 2014 @@ -107,11 +107,13 @@ public class RenderingManager implements { m_engine = engine; - if (m_cacheManager.cacheExists(DOCUMENTCACHE_NAME)) { - m_documentCache = m_cacheManager.getCache(DOCUMENTCACHE_NAME); + String documentCacheName = engine.getApplicationName() + "." + DOCUMENTCACHE_NAME; + + if (m_cacheManager.cacheExists(documentCacheName)) { + m_documentCache = m_cacheManager.getCache(documentCacheName); } else { - log.info("cache with name " + DOCUMENTCACHE_NAME + " not found in ehcache.xml, creating it with defaults."); - m_documentCache = new Cache(DOCUMENTCACHE_NAME, DEFAULT_CACHESIZE, false, false, m_cacheExpiryPeriod, m_cacheExpiryPeriod); + log.info("cache with name " + documentCacheName + " not found in ehcache.xml, creating it with defaults."); + m_documentCache = new Cache(documentCacheName, DEFAULT_CACHESIZE, false, false, m_cacheExpiryPeriod, m_cacheExpiryPeriod); m_cacheManager.addCache(m_documentCache); } Modified: jspwiki/trunk/jspwiki-war/src/main/resources/ehcache.xml URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/ehcache.xml?rev=1588836&r1=1588835&r2=1588836&view=diff ============================================================================== --- jspwiki/trunk/jspwiki-war/src/main/resources/ehcache.xml (original) +++ jspwiki/trunk/jspwiki-war/src/main/resources/ehcache.xml Sun Apr 20 21:29:02 2014 @@ -59,19 +59,19 @@ (specified as LFU) --> - + - + - + - + - + - + - + - +