Skip to content

Commit

Permalink
Extract marshalling and service modules from wildfly-clustering-common.
Browse files Browse the repository at this point in the history
  • Loading branch information
pferraro committed Jan 5, 2015
1 parent d13bb1f commit 82d9de7
Show file tree
Hide file tree
Showing 71 changed files with 127 additions and 196 deletions.
4 changes: 4 additions & 0 deletions clustering/common/pom.xml
Expand Up @@ -38,6 +38,10 @@
<name>WildFly: Common code for clustering subsystems</name>

<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-service</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-naming</artifactId>
Expand Down

This file was deleted.

9 changes: 4 additions & 5 deletions clustering/ee/infinispan/pom.xml
Expand Up @@ -46,15 +46,14 @@
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Expand Up @@ -19,19 +19,22 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.as.clustering.concurrent;
package org.wildfly.clustering.ee.infinispan;

import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

import org.jboss.as.clustering.logging.ClusteringLogger;
import org.jboss.logging.Logger;
import org.wildfly.clustering.ee.Invoker;

/**
* A invocation strategy that invokes a given task, retrying a configurable number of times on failure using backoff sleep intervals.
* @author Paul Ferraro
*/
public class RetryingInvoker implements Invoker {

private static final Logger LOGGER = Logger.getLogger(RetryingInvoker.class);

private final long[] backOffIntervals;
private final TimeUnit unit;

Expand Down Expand Up @@ -67,7 +70,7 @@ public <R> R invoke(Callable<R> task) throws Exception {
} catch (Exception e) {
exception = e;
}
ClusteringLogger.ROOT_LOGGER.debugf(exception, "Attempt #%d failed", i + 1);
LOGGER.debugf(exception, "Attempt #%d failed", i + 1);
}

throw exception;
Expand Down
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.as.clustering.concurrent;
package org.wildfly.clustering.ee;

import java.util.concurrent.Callable;

Expand Down
Expand Up @@ -23,8 +23,8 @@

import java.util.Map;

import org.jboss.as.clustering.marshalling.MarshalledValue;
import org.jboss.as.clustering.marshalling.MarshallingContext;
import org.wildfly.clustering.marshalling.MarshalledValue;
import org.wildfly.clustering.marshalling.MarshallingContext;

/**
* The cache entry for a bean group
Expand Down
Expand Up @@ -42,8 +42,6 @@
import org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent;
import org.infinispan.notifications.cachelistener.event.DataRehashedEvent;
import org.infinispan.remoting.transport.Address;
import org.jboss.as.clustering.concurrent.Invoker;
import org.jboss.as.clustering.concurrent.RetryingInvoker;
import org.jboss.as.clustering.infinispan.affinity.KeyAffinityServiceFactory;
import org.jboss.as.clustering.infinispan.distribution.ConsistentHashLocality;
import org.jboss.as.clustering.infinispan.distribution.Locality;
Expand All @@ -55,7 +53,9 @@
import org.wildfly.clustering.dispatcher.CommandDispatcher;
import org.wildfly.clustering.dispatcher.CommandDispatcherFactory;
import org.wildfly.clustering.ee.Batcher;
import org.wildfly.clustering.ee.Invoker;
import org.wildfly.clustering.ee.infinispan.InfinispanBatcher;
import org.wildfly.clustering.ee.infinispan.RetryingInvoker;
import org.wildfly.clustering.ee.infinispan.TransactionBatch;
import org.wildfly.clustering.ejb.Bean;
import org.wildfly.clustering.ejb.BeanManager;
Expand Down
Expand Up @@ -29,11 +29,6 @@
import org.jboss.as.clustering.infinispan.affinity.KeyAffinityServiceFactory;
import org.jboss.as.clustering.infinispan.affinity.KeyAffinityServiceFactoryService;
import org.jboss.as.clustering.infinispan.subsystem.CacheService;
import org.jboss.as.clustering.marshalling.MarshalledValueFactory;
import org.jboss.as.clustering.marshalling.MarshallingContext;
import org.jboss.as.clustering.marshalling.SimpleMarshalledValueFactory;
import org.jboss.as.clustering.marshalling.SimpleMarshallingContextFactory;
import org.jboss.as.clustering.marshalling.VersionedMarshallingConfiguration;
import org.jboss.msc.service.AbstractService;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceName;
Expand All @@ -53,6 +48,11 @@
import org.wildfly.clustering.ejb.infinispan.bean.InfinispanBeanFactory;
import org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupFactory;
import org.wildfly.clustering.group.NodeFactory;
import org.wildfly.clustering.marshalling.MarshalledValueFactory;
import org.wildfly.clustering.marshalling.MarshallingContext;
import org.wildfly.clustering.marshalling.SimpleMarshalledValueFactory;
import org.wildfly.clustering.marshalling.SimpleMarshallingContextFactory;
import org.wildfly.clustering.marshalling.VersionedMarshallingConfiguration;
import org.wildfly.clustering.registry.Registry;
import org.wildfly.clustering.spi.CacheServiceNames;
import org.wildfly.clustering.spi.GroupServiceNames;
Expand Down
Expand Up @@ -26,12 +26,9 @@

import org.infinispan.configuration.cache.Configuration;
import org.infinispan.manager.EmbeddedCacheManager;
import org.jboss.as.clustering.concurrent.CachedThreadPoolExecutorService;
import org.jboss.as.clustering.concurrent.RemoveOnCancelScheduledExecutorService;
import org.jboss.as.clustering.infinispan.subsystem.CacheConfigurationService;
import org.jboss.as.clustering.infinispan.subsystem.CacheService;
import org.jboss.as.clustering.infinispan.subsystem.EmbeddedCacheManagerService;
import org.jboss.as.clustering.msc.AsynchronousService;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.service.ServiceController;
Expand All @@ -44,6 +41,9 @@
import org.wildfly.clustering.ejb.BeanManagerFactory;
import org.wildfly.clustering.ejb.BeanManagerFactoryBuilder;
import org.wildfly.clustering.ejb.BeanManagerFactoryBuilderConfiguration;
import org.wildfly.clustering.service.AsynchronousService;
import org.wildfly.clustering.service.concurrent.CachedThreadPoolExecutorService;
import org.wildfly.clustering.service.concurrent.RemoveOnCancelScheduledExecutorService;
import org.wildfly.security.manager.action.GetAccessControlContextAction;

/**
Expand Down
Expand Up @@ -25,13 +25,13 @@
import java.util.Map;
import java.util.Set;

import org.jboss.as.clustering.marshalling.MarshallingContext;
import org.wildfly.clustering.ee.infinispan.Mutator;
import org.wildfly.clustering.ee.infinispan.Remover;
import org.wildfly.clustering.ejb.PassivationListener;
import org.wildfly.clustering.ejb.infinispan.BeanGroup;
import org.wildfly.clustering.ejb.infinispan.BeanGroupEntry;
import org.wildfly.clustering.ejb.infinispan.logging.InfinispanEjbLogger;
import org.wildfly.clustering.marshalling.MarshallingContext;

/**
* A {@link org.wildfly.clustering.ejb.infinispan.BeanGroup} implementation backed by an infinispan cache.
Expand Down
Expand Up @@ -26,9 +26,9 @@
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;

import org.jboss.as.clustering.marshalling.MarshalledValue;
import org.jboss.as.clustering.marshalling.MarshallingContext;
import org.wildfly.clustering.ejb.infinispan.BeanGroupEntry;
import org.wildfly.clustering.marshalling.MarshalledValue;
import org.wildfly.clustering.marshalling.MarshallingContext;

/**
* The cache entry of a bean group.
Expand Down
Expand Up @@ -27,8 +27,8 @@
import java.util.Map;

import org.jboss.as.clustering.infinispan.io.AbstractSimpleExternalizer;
import org.jboss.as.clustering.marshalling.MarshalledValue;
import org.jboss.as.clustering.marshalling.MarshallingContext;
import org.wildfly.clustering.marshalling.MarshalledValue;
import org.wildfly.clustering.marshalling.MarshallingContext;

/**
* @author Paul Ferraro
Expand Down
Expand Up @@ -26,13 +26,13 @@

import org.infinispan.Cache;
import org.infinispan.context.Flag;
import org.jboss.as.clustering.marshalling.MarshalledValueFactory;
import org.jboss.as.clustering.marshalling.MarshallingContext;
import org.wildfly.clustering.ee.infinispan.Mutator;
import org.wildfly.clustering.ejb.infinispan.BeanGroup;
import org.wildfly.clustering.ejb.infinispan.BeanGroupEntry;
import org.wildfly.clustering.ejb.infinispan.BeanGroupFactory;
import org.wildfly.clustering.ejb.infinispan.logging.InfinispanEjbLogger;
import org.wildfly.clustering.marshalling.MarshalledValueFactory;
import org.wildfly.clustering.marshalling.MarshallingContext;

/**
* Encapsulates the cache mapping strategy of a bean group.
Expand Down
Expand Up @@ -27,15 +27,15 @@
import java.util.Collections;
import java.util.Map;

import org.jboss.as.clustering.marshalling.MarshalledValue;
import org.jboss.as.clustering.marshalling.MarshallingContext;
import org.junit.Assert;
import org.junit.Test;
import org.wildfly.clustering.ee.infinispan.Mutator;
import org.wildfly.clustering.ee.infinispan.Remover;
import org.wildfly.clustering.ejb.PassivationListener;
import org.wildfly.clustering.ejb.infinispan.BeanGroup;
import org.wildfly.clustering.ejb.infinispan.BeanGroupEntry;
import org.wildfly.clustering.marshalling.MarshalledValue;
import org.wildfly.clustering.marshalling.MarshallingContext;

public class InfinispanBeanGroupTestCase {
private Integer id;
Expand Down
Expand Up @@ -35,8 +35,8 @@
import org.infinispan.affinity.impl.KeyAffinityServiceImpl;
import org.infinispan.notifications.cachemanagerlistener.event.CacheStoppedEvent;
import org.infinispan.remoting.transport.Address;
import org.wildfly.clustering.service.AsynchronousService;
import org.wildfly.security.manager.action.GetAccessControlContextAction;
import org.jboss.as.clustering.msc.AsynchronousService;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceName;
Expand Down
Expand Up @@ -21,7 +21,7 @@
*/
package org.jboss.as.clustering.infinispan.io;

import org.jboss.as.clustering.marshalling.HashableMarshalledValue;
import org.wildfly.clustering.marshalling.HashableMarshalledValue;

/**
* @author Paul Ferraro
Expand Down
Expand Up @@ -21,7 +21,7 @@
*/
package org.jboss.as.clustering.infinispan.io;

import org.jboss.as.clustering.marshalling.SimpleMarshalledValue;
import org.wildfly.clustering.marshalling.SimpleMarshalledValue;

/**
* @author Paul Ferraro
Expand Down
Expand Up @@ -65,7 +65,6 @@
import org.jboss.as.clustering.dmr.ModelNodes;
import org.jboss.as.clustering.infinispan.CacheContainer;
import org.jboss.as.clustering.infinispan.InfinispanLogger;
import org.jboss.as.clustering.msc.AsynchronousService;
import org.jboss.as.clustering.naming.BinderServiceBuilder;
import org.jboss.as.clustering.naming.JndiNameFactory;
import org.jboss.as.controller.AbstractAddStepHandler;
Expand Down Expand Up @@ -94,6 +93,7 @@
import org.jboss.msc.service.ServiceTarget;
import org.jboss.msc.value.InjectedValue;
import org.jboss.tm.XAResourceRecoveryRegistry;
import org.wildfly.clustering.service.AsynchronousService;
import org.wildfly.clustering.spi.CacheServiceInstaller;
import org.wildfly.clustering.spi.ClusteredCacheServiceInstaller;
import org.wildfly.clustering.spi.LocalCacheServiceInstaller;
Expand Down
Expand Up @@ -41,7 +41,6 @@
import org.jboss.as.clustering.jgroups.subsystem.ChannelFactoryService;
import org.jboss.as.clustering.jgroups.subsystem.ChannelService;
import org.jboss.as.clustering.jgroups.subsystem.JGroupsSubsystemResourceDefinition;
import org.jboss.as.clustering.msc.InjectedValueServiceBuilder;
import org.jboss.as.clustering.naming.BinderServiceBuilder;
import org.jboss.as.clustering.naming.JndiNameFactory;
import org.jboss.as.controller.AbstractAddStepHandler;
Expand All @@ -68,6 +67,7 @@
import org.jboss.msc.service.ServiceTarget;
import org.jboss.msc.value.InjectedValue;
import org.jgroups.Channel;
import org.wildfly.clustering.service.InjectedValueServiceBuilder;
import org.wildfly.clustering.spi.CacheServiceInstaller;
import org.wildfly.clustering.spi.ClusteredGroupServiceInstaller;
import org.wildfly.clustering.spi.ClusteredCacheServiceInstaller;
Expand Down
Expand Up @@ -29,7 +29,6 @@
import org.jboss.as.clustering.dmr.ModelNodes;
import org.jboss.as.clustering.jgroups.ChannelFactory;
import org.jboss.as.clustering.jgroups.logging.JGroupsLogger;
import org.jboss.as.clustering.msc.InjectedValueServiceBuilder;
import org.jboss.as.clustering.naming.BinderServiceBuilder;
import org.jboss.as.controller.AbstractAddStepHandler;
import org.jboss.as.controller.OperationContext;
Expand All @@ -42,6 +41,7 @@
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.service.ServiceTarget;
import org.jgroups.Channel;
import org.wildfly.clustering.service.InjectedValueServiceBuilder;
import org.wildfly.clustering.spi.ClusteredGroupServiceInstaller;
import org.wildfly.clustering.spi.GroupServiceInstaller;

Expand Down
Expand Up @@ -32,7 +32,6 @@
import org.jboss.as.clustering.jgroups.ChannelFactory;
import org.jboss.as.clustering.jgroups.ProtocolConfiguration;
import org.jboss.as.clustering.jgroups.subsystem.StackAddHandler.Protocol;
import org.jboss.as.clustering.msc.InjectedValueServiceBuilder;
import org.jboss.as.clustering.naming.BinderServiceBuilder;
import org.jboss.as.controller.AbstractAddStepHandler;
import org.jboss.as.controller.OperationContext;
Expand All @@ -48,6 +47,7 @@
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceTarget;
import org.jgroups.Channel;
import org.wildfly.clustering.service.InjectedValueServiceBuilder;

/**
* Add operation handler for fork resources.
Expand Down

0 comments on commit 82d9de7

Please sign in to comment.