Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFLY-1813 Upgrade JGroups to 3.4, WFLY-1777 Upgrade Infinispan to 6.0 #5034

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@
<maven-resource group="com.google.guava" artifact="guava" />
</module-def>

<module-def name="com.google.protobuf">
<maven-resource group="com.google.protobuf" artifact="protobuf-java" />
</module-def>

<module-def name="com.h2database.h2">
<maven-resource group="com.h2database" artifact="h2"/>
</module-def>
Expand Down Expand Up @@ -819,6 +823,10 @@
<maven-resource group="org.infinispan" artifact="infinispan-core"/>
</module-def>

<module-def name="org.infinispan.commons">
<maven-resource group="org.infinispan" artifact="infinispan-commons"/>
</module-def>

<module-def name="org.infinispan.cachestore.jdbc">
<maven-resource group="org.infinispan" artifact="infinispan-cachestore-jdbc" />
</module-def>
Expand All @@ -828,7 +836,10 @@
</module-def>

<module-def name="org.infinispan.client.hotrod">
<maven-resource group="org.infinispan" artifact="infinispan-client-hotrod" />
<maven-resource group="org.infinispan" artifact="infinispan-client-hotrod"/>
<maven-resource group="org.infinispan" artifact="infinispan-query-dsl"/>
<maven-resource group="org.infinispan" artifact="infinispan-remote-query-client"/>
<maven-resource group="org.infinispan.protostream" artifact="protostream"/>
</module-def>

<module-def name="org.jacorb">
Expand Down
35 changes: 30 additions & 5 deletions build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,6 @@
<artifactId>jackson-module-jaxb-annotations</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>

<dependency>
<groupId>com.github.relaxng</groupId>
<artifactId>relaxngDatatype</artifactId>
Expand All @@ -290,6 +285,16 @@
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>

<dependency>
<groupId>com.sun.codemodel</groupId>
<artifactId>codemodel</artifactId>
Expand Down Expand Up @@ -847,11 +852,31 @@
<artifactId>infinispan-client-hotrod</artifactId>
</dependency>

<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-commons</artifactId>
</dependency>

<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
</dependency>

<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-query-dsl</artifactId>
</dependency>

<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-remote-query-client</artifactId>
</dependency>

<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream</artifactId>
</dependency>

<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2013, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<module xmlns="urn:jboss:module:1.1" name="com.google.protobuf">
<properties>
<property name="jboss.api" value="private"/>
</properties>

<resources>
<!-- Insert resources here -->
</resources>

<dependencies>
</dependencies>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<module name="javax.transaction.api"/>
<module name="org.apache.commons.pool"/>
<module name="org.infinispan"/>
<module name="org.infinispan.commons"/>
<module name="org.jboss.logging"/>
</dependencies>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<module name="javax.transaction.api"/>
<module name="org.infinispan"/>
<module name="org.infinispan.client.hotrod"/>
<module name="org.infinispan.commons"/>
<module name="org.jboss.logging"/>
</dependencies>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@

<dependencies>
<module name="javax.api"/>
<module name="com.google.protobuf"/>
<module name="org.apache.commons.pool"/>
<module name="org.infinispan"/>
<module name="org.infinispan.commons"/>
<module name="org.jboss.logging"/>
</dependencies>
</module>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2010, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<module xmlns="urn:jboss:module:1.1" name="org.infinispan.commons">
<resources>
<!-- Insert resources here -->
</resources>

<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.marshalling"/>
<module name="org.jboss.marshalling.river"/>
<module name="sun.jdk"/>
</dependencies>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
<module name="org.infinispan.cachestore.jdbc" optional="true"/>
<module name="org.infinispan.cachestore.remote" optional="true"/>
<module name="org.infinispan.client.hotrod" optional="true"/>
<module name="org.infinispan.commons"/>
<module name="org.jboss.jandex"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.marshalling"/>
<module name="org.jboss.marshalling.river"/>
<module name="org.jboss.staxmapper"/>
<module name="org.jgroups"/>
<module name="sun.jdk"/>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<module name="org.infinispan.cachestore.jdbc"/>
<module name="org.infinispan.cachestore.remote"/>
<module name="org.infinispan.client.hotrod" optional="true"/>
<module name="org.infinispan.commons"/>
<module name="org.jboss.as.clustering.common"/>
<module name="org.jboss.as.clustering.jgroups"/>
<module name="org.jboss.as.controller"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<module name="javax.servlet.api"/>
<module name="javax.transaction.api"/>
<module name="org.infinispan"/>
<module name="org.infinispan.commons"/>
<module name="org.jboss.as.clustering.infinispan"/>
<module name="org.jboss.as.core-security"/>
<module name="org.jboss.as.controller"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
import org.infinispan.affinity.KeyGenerator;
import org.infinispan.context.Flag;
import org.infinispan.distribution.DistributionManager;
import org.infinispan.loaders.CacheLoaderException;
import org.infinispan.loaders.CacheLoaderManager;
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryActivated;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryPassivated;
import org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent;
import org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent;
import org.infinispan.persistence.CacheLoaderException;
import org.infinispan.persistence.manager.PersistenceManager;
import org.infinispan.remoting.transport.Address;
import org.jboss.as.clustering.infinispan.affinity.KeyAffinityServiceFactory;
import org.jboss.as.clustering.infinispan.invoker.CacheInvoker;
Expand Down Expand Up @@ -296,10 +296,9 @@ public int getStoreSize() {
@Override
public int getPassivatedCount() {
try {
return this.cache.getAdvancedCache().getComponentRegistry().getComponent(CacheLoaderManager.class).getCacheStore()
.loadAll().size();
return this.cache.getAdvancedCache().getComponentRegistry().getComponent(PersistenceManager.class).size();
} catch (CacheLoaderException e) {
throw InfinispanEjbMessages.MESSAGES.CacheLoaderFailure(e);
throw InfinispanEjbMessages.MESSAGES.cacheLoaderFailure(e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ public interface InfinispanEjbMessages {
RuntimeException lockAcquisitionInterruption(@Cause Throwable cause, Object key);

@Message(id = 10364, value = "Failed to load infinispan cache store")
RuntimeException CacheLoaderFailure(@Cause Throwable cause);
RuntimeException cacheLoaderFailure(@Cause Throwable cause);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.jboss.as.clustering.infinispan;

import org.infinispan.factories.GlobalComponentRegistry;
import org.infinispan.manager.EmbeddedCacheManager;

public interface CacheContainer extends EmbeddedCacheManager {
Expand All @@ -14,6 +13,4 @@ public interface CacheContainer extends EmbeddedCacheManager {
* @return a cache name
*/
String getDefaultCacheName();

GlobalComponentRegistry getGlobalComponentRegistry();
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@

package org.jboss.as.clustering.infinispan;

import java.lang.reflect.Field;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
Expand All @@ -34,7 +31,6 @@
import org.infinispan.Cache;
import org.infinispan.configuration.cache.Configuration;
import org.infinispan.configuration.global.GlobalConfiguration;
import org.infinispan.factories.GlobalComponentRegistry;
import org.infinispan.manager.AbstractDelegatingEmbeddedCacheManager;
import org.infinispan.manager.DefaultCacheManager;
import org.infinispan.manager.EmbeddedCacheManager;
Expand Down Expand Up @@ -197,30 +193,6 @@ public String toString() {
return this.cm.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName();
}

// This is only exposed in Infinispan 6.0.
// Until then, use a reflection hack.
@Override
public GlobalComponentRegistry getGlobalComponentRegistry() {
PrivilegedAction<Field> action = new PrivilegedAction<Field>() {
@Override
public Field run() {
try {
Field field = DefaultCacheManager.class.getDeclaredField("globalComponentRegistry");
field.setAccessible(true);
return field;
} catch (NoSuchFieldException e) {
throw new IllegalStateException(e);
}
}
};
Field field = AccessController.doPrivileged(action);
try {
return (GlobalComponentRegistry) field.get(this.cm);
} catch (IllegalAccessException e) {
throw new IllegalStateException(e);
}
}

private class DelegatingCache<K, V> extends AbstractDelegatingAdvancedCache<K, V> {
DelegatingCache(AdvancedCache<K, V> cache) {
super(cache, new AdvancedCacheWrapper<K, V>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

package org.jboss.as.clustering.infinispan;

import java.net.URL;
import java.net.UnknownHostException;
import java.util.Properties;

Expand Down Expand Up @@ -169,7 +170,7 @@ public interface InfinispanMessages {
* @return IllegalStateException instance.
*/
@Message(id = 10381, value = "Failed to parse %s")
IllegalStateException failedToParse(@Cause Throwable cause, String resourceName);
IllegalStateException failedToParse(@Cause Throwable cause, URL url);

/**
* Creates an exception indicating a singleton resource already exists.
Expand Down Expand Up @@ -215,5 +216,4 @@ public interface InfinispanMessages {
*/
@Message(id = 10387, value = "Failed to invoke operation: %s")
OperationFailedException failedToInvokeOperation(@Cause Throwable cause, String operation);

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Executor factory that produces {@link ManagedExecutorService} instances.
* @author Paul Ferraro
*/
public class ManagedExecutorFactory implements org.infinispan.executors.ExecutorFactory {
public class ManagedExecutorFactory implements org.infinispan.commons.executors.ExecutorFactory {

private final Executor executor;

Expand Down
Loading