[jboss-cvs] JBossAS SVN: r106995 - in projects/cluster/ha-server-cache-ispn/trunk: src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jul 21 14:04:01 EDT 2010
Author: pferraro
Date: 2010-07-21 14:04:01 -0400 (Wed, 21 Jul 2010)
New Revision: 106995
Modified:
projects/cluster/ha-server-cache-ispn/trunk/pom.xml
projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryImpl.java
projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerImpl.java
projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/SessionAttributeMarshallerImpl.java
Log:
Drop dependency on jboss-serialization.
Drop TomcatClusterConfig support.
Modified: projects/cluster/ha-server-cache-ispn/trunk/pom.xml
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/pom.xml 2010-07-21 18:00:24 UTC (rev 106994)
+++ projects/cluster/ha-server-cache-ispn/trunk/pom.xml 2010-07-21 18:04:01 UTC (rev 106995)
@@ -32,14 +32,9 @@
<version.jboss.ha.server.cache.spi>3.0.0-SNAPSHOT</version.jboss.ha.server.cache.spi>
<version.jboss.ha.server.api>2.0.0.Alpha3</version.jboss.ha.server.api>
<version.jboss.ha.server.ispn>1.0.0-SNAPSHOT</version.jboss.ha.server.ispn>
- <version.jboss.common.core>2.2.17.GA</version.jboss.common.core>
- <version.jboss.logging>3.0.0.Beta2</version.jboss.logging>
- <version.org.jboss.naming>5.0.5.Final</version.org.jboss.naming>
- <version.suffix.org.jboss.javaee>.GA</version.suffix.org.jboss.javaee>
- <version.org.jboss.metadata.war>2.0.0.Alpha14</version.org.jboss.metadata.war>
+ <version.infinispan>4.1.0.CR2</version.infinispan>
<version.junit>4.8.1</version.junit>
<version.easymock>3.0</version.easymock>
- <version.infinispan>4.1.0.CR2</version.infinispan>
</properties>
<build>
@@ -61,22 +56,6 @@
<!-- Global dependencies -->
<dependency>
<groupId>org.jboss.cluster</groupId>
- <artifactId>jboss-ha-server-api</artifactId>
- <version>${version.jboss.ha.server.api}</version>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.cluster</groupId>
- <artifactId>jboss-ha-client</artifactId>
- </exclusion>
- <exclusion>
- <groupId>jgroups</groupId>
- <artifactId>jgroups</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.cluster</groupId>
<artifactId>jboss-ha-server-cache-spi</artifactId>
<version>${version.jboss.ha.server.cache.spi}</version>
</dependency>
@@ -92,6 +71,7 @@
<artifactId>infinispan-tree</artifactId>
<version>${version.infinispan}</version>
<exclusions>
+ <!-- Already provided by jboss-ha-server-ispn -->
<exclusion>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
@@ -102,18 +82,6 @@
</exclusion>
</exclusions>
</dependency>
-
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <version>${version.org.jboss.naming}</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.metadata</groupId>
- <artifactId>jboss-metadata-war</artifactId>
- <version>${version.org.jboss.metadata.war}</version>
- </dependency>
<!-- Test dependencies -->
Modified: projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryImpl.java
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryImpl.java 2010-07-21 18:00:24 UTC (rev 106994)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerFactoryImpl.java 2010-07-21 18:04:01 UTC (rev 106995)
@@ -22,19 +22,19 @@
package org.jboss.ha.web.tomcat.service.session.distributedcache.impl;
import org.infinispan.manager.CacheContainer;
+import org.jboss.ha.framework.server.MarshalledValueObjectStreamSource;
import org.jboss.ha.ispn.CacheContainerRegistry;
import org.jboss.metadata.web.jboss.ReplicationGranularity;
import org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager;
+import org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManagerFactory;
import org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager;
import org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData;
-import org.jboss.web.tomcat.service.session.distributedcache.spi.TomcatClusterConfig;
-import org.jboss.web.tomcat.service.session.distributedcache.spi.TomcatClusterDistributedCacheManagerFactory;
/**
* @author Paul Ferraro
*
*/
-public class DistributedCacheManagerFactoryImpl implements TomcatClusterDistributedCacheManagerFactory
+public class DistributedCacheManagerFactoryImpl implements DistributedCacheManagerFactory
{
private final CacheContainerRegistry registry;
private volatile String cacheContainerName;
@@ -56,7 +56,7 @@
@SuppressWarnings("unchecked")
private <T extends OutgoingDistributableSessionData> SessionAttributeStorage<T> getSessionAttributeStorage(LocalDistributableSessionManager manager)
{
- SessionAttributeMarshaller marshaller = new SessionAttributeMarshallerImpl(manager);
+ SessionAttributeMarshaller marshaller = new SessionAttributeMarshallerImpl(manager, new MarshalledValueObjectStreamSource());
ReplicationGranularity granularity = manager.getReplicationConfig().getReplicationGranularity();
switch (granularity)
@@ -89,25 +89,4 @@
{
this.cacheContainerName = cacheContainerName;
}
-
- @Override
- public TomcatClusterConfig getTomcatClusterConfig()
- {
- return null;
- }
-
- @Override
- public void setTomcatClusterConfig(TomcatClusterConfig clusterConfig)
- {
- }
-
- @Override
- public void start() throws Exception
- {
- }
-
- @Override
- public void stop() throws Exception
- {
- }
}
Modified: projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerImpl.java
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerImpl.java 2010-07-21 18:00:24 UTC (rev 106994)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerImpl.java 2010-07-21 18:04:01 UTC (rev 106995)
@@ -101,9 +101,6 @@
String hostName = this.manager.getHostName();
String host = (hostName == null) || hostName.isEmpty() ? "localhost" : hostName;
- // JBAS-3941 -- context path can be multi-level, but we don't
- // want that turning into a multilevel Fqn, so escape it
- // Use '-' which is legal in a filesystem path
String context = this.manager.getContextName();
String path = context.isEmpty() || context.equals("/") ? "ROOT" : context.startsWith("/") ? context.substring(1) : context;
Modified: projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/SessionAttributeMarshallerImpl.java
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/SessionAttributeMarshallerImpl.java 2010-07-21 18:00:24 UTC (rev 106994)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/main/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/SessionAttributeMarshallerImpl.java 2010-07-21 18:04:01 UTC (rev 106995)
@@ -25,11 +25,11 @@
import java.io.Serializable;
import java.security.AccessController;
+import org.jboss.ha.framework.interfaces.ObjectStreamSource;
import org.jboss.ha.framework.server.MarshalledValueHelper;
import org.jboss.ha.framework.server.SimpleCachableMarshalledValue;
import org.jboss.util.loading.ContextClassLoaderSwitcher;
import org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager;
-import org.jboss.web.tomcat.service.session.distributedcache.spi.SessionSerializationFactory;
/**
* @author Paul Ferraro
@@ -38,10 +38,12 @@
public class SessionAttributeMarshallerImpl implements SessionAttributeMarshaller
{
private final LocalDistributableSessionManager manager;
+ private final ObjectStreamSource source;
- public SessionAttributeMarshallerImpl(LocalDistributableSessionManager manager)
+ public SessionAttributeMarshallerImpl(LocalDistributableSessionManager manager, ObjectStreamSource source)
{
this.manager = manager;
+ this.source = source;
}
/**
@@ -61,8 +63,8 @@
{
throw new IllegalArgumentException(String.format("%s does not implement %s", value, Serializable.class.getName()));
}
-
- return new SimpleCachableMarshalledValue((Serializable) value, SessionSerializationFactory.getObjectStreamSource(), true);
+
+ return new SimpleCachableMarshalledValue((Serializable) value, this.source, true);
}
/**
@@ -86,7 +88,7 @@
// Swap in/out the class loader for this web app. Needed only for unmarshalling.
switchContext.setClassLoader(this.manager.getApplicationClassLoader());
- value.setObjectStreamSource(SessionSerializationFactory.getObjectStreamSource());
+ value.setObjectStreamSource(this.source);
return value.get();
}
More information about the jboss-cvs-commits
mailing list