directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1648752 - in /directory/apacheds/trunk: ./ core-annotations/src/main/java/org/apache/directory/server/core/factory/ core-api/ core-api/src/main/java/org/apache/directory/server/core/api/ core-shared/ core/src/main/java/org/apache/directory...
Date Wed, 31 Dec 2014 17:40:07 GMT
Author: coheigea
Date: Wed Dec 31 17:40:07 2014
New Revision: 1648752

URL: http://svn.apache.org/r1648752
Log:
[DIRSERVER-2036] - Upgrade EhCache dependency

Modified:
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
    directory/apacheds/trunk/core-api/pom.xml
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CacheService.java
    directory/apacheds/trunk/core-shared/pom.xml
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/interceptors/authz/pom.xml
    directory/apacheds/trunk/interceptors/hash/pom.xml
    directory/apacheds/trunk/interceptors/logger/pom.xml
    directory/apacheds/trunk/interceptors/subtree/pom.xml
    directory/apacheds/trunk/kerberos-codec/pom.xml
    directory/apacheds/trunk/pom.xml
    directory/apacheds/trunk/protocol-kerberos/pom.xml

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
(original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
Wed Dec 31 17:40:07 2014
@@ -248,7 +248,7 @@ public class DefaultDirectoryServiceFact
         buildInstanceDirectory( name );
 
         CacheService cacheService = new CacheService();
-        cacheService.initialize( directoryService.getInstanceLayout() );
+        cacheService.initialize( directoryService.getInstanceLayout(), name );
 
         directoryService.setCacheService( cacheService );
 

Modified: directory/apacheds/trunk/core-api/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/pom.xml?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/pom.xml (original)
+++ directory/apacheds/trunk/core-api/pom.xml Wed Dec 31 17:40:07 2014
@@ -113,8 +113,8 @@
     </dependency>
     
     <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.ehcache</artifactId>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache</artifactId>
     </dependency>
 
   </dependencies>

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CacheService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CacheService.java?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CacheService.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CacheService.java
Wed Dec 31 17:40:07 2014
@@ -22,6 +22,7 @@ package org.apache.directory.server.core
 
 
 import java.io.File;
+import java.util.UUID;
 
 import net.sf.ehcache.Cache;
 import net.sf.ehcache.CacheManager;
@@ -46,7 +47,7 @@ import org.slf4j.LoggerFactory;
  */
 public class CacheService
 {
-
+    
     private static final String DIRECTORY_CACHESERVICE_XML = "directory-cacheservice.xml";
 
     private static final Logger LOG = LoggerFactory.getLogger( CacheService.class );
@@ -79,6 +80,11 @@ public class CacheService
 
     public void initialize( InstanceLayout layout )
     {
+        initialize( layout, null );
+    }
+        
+    public void initialize( InstanceLayout layout, String instanceId )
+    {
         if ( initialized )
         {
             LOG.debug( "CacheService was already initialized, returning" );
@@ -91,7 +97,6 @@ public class CacheService
             initialized = true;
             return;
         }
-
         Configuration cc;
         String cachePath = null;
 
@@ -123,7 +128,16 @@ public class CacheService
             cachePath = FileUtils.getTempDirectoryPath();
         }
 
+        String confName = UUID.randomUUID().toString();
+        cc.setName( confName );
+        
+        if ( cachePath == null )
+        {
+            cachePath = FileUtils.getTempDirectoryPath();
+        }
+        cachePath += File.separator + confName;
         cc.getDiskStoreConfiguration().setPath( cachePath );
+
         cacheManager = new CacheManager( cc );
 
         initialized = true;
@@ -138,9 +152,9 @@ public class CacheService
         }
 
         LOG.info( "clearing all the caches" );
-
+        
         initialized = false;
-
+        
         cacheManager.clearAll();
         cacheManager.shutdown();
     }
@@ -175,7 +189,7 @@ public class CacheService
 
     public void attach( Cache cache )
     {
-        cacheManager.addCache( cache );
+        cacheManager.addCacheIfAbsent( cache );
     }
 
 }

Modified: directory/apacheds/trunk/core-shared/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-shared/pom.xml?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/core-shared/pom.xml (original)
+++ directory/apacheds/trunk/core-shared/pom.xml Wed Dec 31 17:40:07 2014
@@ -78,8 +78,8 @@
     </dependency>
     
     <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.ehcache</artifactId>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache</artifactId>
     </dependency>
 
     <dependency>

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Wed Dec 31 17:40:07 2014
@@ -1777,7 +1777,7 @@ public class DefaultDirectoryService imp
             cacheService = new CacheService();
         }
 
-        cacheService.initialize( instanceLayout );
+        cacheService.initialize( instanceLayout, instanceId );
 
         // Initialize the AP caches
         accessControlAPCache = new DnNode<AccessControlAdministrativePoint>();

Modified: directory/apacheds/trunk/interceptors/authz/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/pom.xml?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/pom.xml (original)
+++ directory/apacheds/trunk/interceptors/authz/pom.xml Wed Dec 31 17:40:07 2014
@@ -73,8 +73,8 @@
     </dependency>
     
     <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.ehcache</artifactId>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache</artifactId>
     </dependency>
   </dependencies>
 

Modified: directory/apacheds/trunk/interceptors/hash/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/hash/pom.xml?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/hash/pom.xml (original)
+++ directory/apacheds/trunk/interceptors/hash/pom.xml Wed Dec 31 17:40:07 2014
@@ -126,8 +126,8 @@
     </dependency-->
     
     <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.ehcache</artifactId>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache</artifactId>
     </dependency>
 
     <dependency>

Modified: directory/apacheds/trunk/interceptors/logger/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/logger/pom.xml?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/logger/pom.xml (original)
+++ directory/apacheds/trunk/interceptors/logger/pom.xml Wed Dec 31 17:40:07 2014
@@ -116,8 +116,8 @@
     </dependency>
     
     <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.ehcache</artifactId>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache</artifactId>
     </dependency>
 
     <dependency>

Modified: directory/apacheds/trunk/interceptors/subtree/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/subtree/pom.xml?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/subtree/pom.xml (original)
+++ directory/apacheds/trunk/interceptors/subtree/pom.xml Wed Dec 31 17:40:07 2014
@@ -78,8 +78,8 @@
     </dependency>
     
     <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.ehcache</artifactId>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache</artifactId>
     </dependency>
   </dependencies>
 

Modified: directory/apacheds/trunk/kerberos-codec/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/pom.xml?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/pom.xml (original)
+++ directory/apacheds/trunk/kerberos-codec/pom.xml Wed Dec 31 17:40:07 2014
@@ -69,8 +69,8 @@
     </dependency>
     
     <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.ehcache</artifactId>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache</artifactId>
     </dependency>
   </dependencies>
 

Modified: directory/apacheds/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/pom.xml?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/pom.xml (original)
+++ directory/apacheds/trunk/pom.xml Wed Dec 31 17:40:07 2014
@@ -63,7 +63,7 @@
     <commons.net.version>3.3</commons.net.version>
     <commons.pool.version>1.6</commons.pool.version>
     <dnsjava.version>2.1.6</dnsjava.version>
-    <ehcache.version>2.4.3</ehcache.version>
+    <ehcache.version>2.8.5</ehcache.version>
     <findbugs.annotations.version>1.0.0</findbugs.annotations.version>
     <jetty.version>6.1.14</jetty.version>
     <junit.version>4.11</junit.version>
@@ -1225,9 +1225,9 @@
       </dependency>
       
       <dependency>
-        <groupId>org.apache.servicemix.bundles</groupId>
-        <artifactId>org.apache.servicemix.bundles.ehcache</artifactId>
-        <version>${ehcache.version}_1</version>
+        <groupId>net.sf.ehcache</groupId>
+        <artifactId>ehcache</artifactId>
+        <version>${ehcache.version}</version>
       </dependency>
     </dependencies>
   </dependencyManagement>

Modified: directory/apacheds/trunk/protocol-kerberos/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/pom.xml?rev=1648752&r1=1648751&r2=1648752&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/pom.xml (original)
+++ directory/apacheds/trunk/protocol-kerberos/pom.xml Wed Dec 31 17:40:07 2014
@@ -73,8 +73,8 @@
     </dependency>
 
     <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.ehcache</artifactId>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache</artifactId>
     </dependency>
   </dependencies>
 



Mime
View raw message