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-2298 Redesign @Stateful EJB clustering #5357

Merged
merged 6 commits into from
Nov 20, 2013
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 7 additions & 2 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,14 @@
<maven-resource group="org.wildfly" artifact="wildfly-clustering-common"/>
</module-def>

<module-def name="org.jboss.as.clustering.ejb3.infinispan">
<maven-resource group="org.wildfly" artifact="wildfly-clustering-ejb3-infinispan"/>
<module-def name="org.wildfly.clustering.ejb.infinispan">
<maven-resource group="org.wildfly" artifact="wildfly-clustering-ejb-infinispan"/>
</module-def>
<module-def name="org.wildfly.clustering.ejb.spi">
<maven-resource group="org.wildfly" artifact="wildfly-clustering-ejb-spi"/>
</module-def>

<module-def name="org.jboss.as.clustering.ejb3.infinispan"/>

<module-def name="org.jboss.as.clustering.infinispan">
<maven-resource group="org.wildfly" artifact="wildfly-clustering-infinispan"/>
Expand Down
8 changes: 5 additions & 3 deletions build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,11 @@

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-ejb3-infinispan</artifactId>
<artifactId>wildfly-clustering-ejb-infinispan</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-ejb-spi</artifactId>
</dependency>

<dependency>
Expand All @@ -994,12 +998,10 @@
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-web-infinispan</artifactId>
</dependency>

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-web-spi</artifactId>
</dependency>

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-web-undertow</artifactId>
Expand Down
24 changes: 8 additions & 16 deletions build/src/main/resources/configuration/subsystems/ejb3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@
</bean-instance-pools>
</pools>
<caches>
<cache name="simple" aliases="NoPassivationCache"/>
<cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
<?CLUSTERED-CACHE?>
<cache name="simple"/>
<cache name="distributable" aliases="passivating clustered" passivation-store-ref="infinispan"/>
</caches>
<passivation-stores>
<file-passivation-store name="file"/>
<?CLUSTER-PASSIVATION-STORE?>
<passivation-store name="infinispan" cache-container="ejb" max-size="10000"/>
</passivation-stores>
<async thread-pool-name="default"/>
<timer-service thread-pool-name="default" default-data-store="default-file-store">
Expand Down Expand Up @@ -53,21 +51,15 @@
<iiop enable-by-default="false" use-qualified-name="false"/>
</replacement>
<replacement placeholder="MDB">
<mdb>
<resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:hornetq-ra}"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
<mdb>
<resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:hornetq-ra}"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
</replacement>
</supplement>
<supplement name="ha">
<replacement placeholder="STATEFUL-BEAN">
<stateful default-access-timeout="5000" cache-ref="simple" clustered-cache-ref="clustered" passivation-disabled-cache-ref="simple"/>
</replacement>
<replacement placeholder="CLUSTERED-CACHE">
<cache name="clustered" passivation-store-ref="infinispan" aliases="StatefulTreeCache"/>
</replacement>
<replacement placeholder="CLUSTER-PASSIVATION-STORE">
<cluster-passivation-store name="infinispan" cache-container="ejb"/>
<stateful default-access-timeout="5000" cache-ref="simple" clustered-cache-ref="distributable" passivation-disabled-cache-ref="simple"/>
</replacement>
</supplement>
<supplement name="full-ha" includes="full ha"/>
Expand Down
14 changes: 9 additions & 5 deletions build/src/main/resources/configuration/subsystems/infinispan.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
<file-store passivation="false" purge="false"/>
</local-cache>
</cache-container>
<cache-container name="ejb" aliases="sfsb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan">
<local-cache name="passivation" batching="true">
<file-store passivation="true" purge="false"/>
</local-cache>
<local-cache name="persistent" batching="true">
<file-store passivation="false" purge="false"/>
</local-cache>
</cache-container>
<cache-container name="hibernate" default-cache="local-query" module="org.hibernate">
<local-cache name="entity">
<transaction mode="NON_XA"/>
Expand Down Expand Up @@ -47,15 +55,11 @@
<file-store/>
</distributed-cache>
</cache-container>
<cache-container name="ejb" aliases="sfsb" default-cache="dist" module="org.jboss.as.clustering.ejb3.infinispan">
<cache-container name="ejb" aliases="sfsb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan">
<transport lock-timeout="60000"/>
<distributed-cache name="dist" mode="ASYNC" batching="true" l1-lifespan="0" owners="4">
<eviction strategy="LRU" max-entries="10000"/>
<file-store/>
</distributed-cache>
<!-- Clustered cache used internally by EJB subsystem for managing the client-mapping(s) of
the socket binding referenced by the EJB remoting connector -->
<replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/>
</cache-container>
<cache-container name="hibernate" default-cache="local-query" module="org.hibernate">
<transport lock-timeout="60000"/>
Expand Down
26 changes: 21 additions & 5 deletions build/src/main/resources/docs/schema/jboss-as-ejb3_2_0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -182,19 +182,35 @@

<xs:complexType name="passivation-storesType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="file-passivation-store" type="file-passivation-storeType"/>
<xs:element name="cluster-passivation-store" type="cluster-passivation-storeType"/>
<xs:element name="passivation-store" type="passivation-storeType"/>
<xs:element name="file-passivation-store" type="file-passivation-storeType">
<xs:annotation>
<xs:documentation>Deprecated. Use passivation-store instead.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="cluster-passivation-store" type="cluster-passivation-storeType">
<xs:annotation>
<xs:documentation>Deprecated. Use passivation-store instead.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:complexType>

<xs:attributeGroup name="passivation-common">
<xs:complexType name="passivation-storeType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="cache-container" type="xs:string" default="ejb"/>
<xs:attribute name="bean-cache" type="xs:string"/>
<xs:attribute name="max-size" type="xs:positiveInteger" default="10000"/>
</xs:complexType>

<xs:attributeGroup name="legacy-passivation">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="idle-timeout" type="xs:positiveInteger" default="300"/>
<xs:attribute name="idle-timeout-unit" type="timeout-unitType" default="SECONDS"/>
</xs:attributeGroup>

<xs:complexType name="file-passivation-storeType">
<xs:attributeGroup ref="passivation-common"/>
<xs:attributeGroup ref="legacy-passivation"/>
<xs:attribute name="max-size" type="xs:positiveInteger" default="100000"/>
<xs:attribute name="relative-to" type="xs:string" default="jboss.server.data.dir"/>
<xs:attribute name="sessions-path" type="xs:string" default="ejb3/sessions"/>
Expand All @@ -203,7 +219,7 @@
</xs:complexType>

<xs:complexType name="cluster-passivation-storeType">
<xs:attributeGroup ref="passivation-common"/>
<xs:attributeGroup ref="legacy-passivation"/>
<xs:attribute name="max-size" type="xs:positiveInteger" default="10000"/>
<xs:attribute name="passivate-events-on-replicate" type="xs:boolean" default="true"/>
<xs:attribute name="cache-container" type="xs:string" default="ejb"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,4 @@
~ 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.jboss.as.clustering.ejb3.infinispan">
<properties>
<property name="jboss.api" value="private"/>
</properties>

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

<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="org.infinispan"/>
<module name="org.jboss.as.controller"/>
<module name="org.jboss.as.clustering.common"/>
<module name="org.jboss.as.clustering.infinispan"/>
<module name="org.jboss.as.clustering.jgroups"/>
<module name="org.jboss.as.ejb3"/>
<module name="org.jboss.as.network"/>
<module name="org.jboss.ejb-client"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.marshalling"/>
<module name="org.jboss.msc"/>
<module name="org.jgroups"/>
<module name="org.wildfly.clustering.api"/>
<module name="org.wildfly.clustering.server" services="import"/>
</dependencies>
</module>
<module-alias xmlns="urn:jboss:module:1.1" name="org.jboss.as.clustering.ejb3.infinispan" target-name="org.wildfly.clustering.ejb.infinispan"/>
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<module name="org.hibernate"/>
<module name="org.jacorb"/>
<module name="org.jboss.as.clustering.common"/>
<module name="org.jboss.as.clustering.ejb3.infinispan" services="import" optional="true"/>
<module name="org.wildfly.clustering.api"/>
<module name="org.wildfly.clustering.ejb.spi"/>
<module name="org.jboss.as.controller"/>
<module name="org.jboss.as.weld"/>
<!-- So we can access its integration API -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?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.wildfly.clustering.ejb.infinispan">
<properties>
<property name="jboss.api" value="private"/>
</properties>

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

<dependencies>
<module name="org.infinispan"/>
<module name="org.jboss.as.clustering.common"/>
<module name="org.jboss.as.clustering.jgroups"/>
<module name="org.jboss.as.clustering.infinispan"/>
<module name="org.jboss.as.network"/>
<module name="org.jboss.as.server"/>
<module name="org.jboss.ejb-client"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.marshalling"/>
<module name="org.jboss.modules"/>
<module name="org.jboss.msc"/>
<module name="org.jboss.threads"/>
<module name="org.jgroups"/>
<module name="org.wildfly.clustering.api"/>
<module name="org.wildfly.clustering.ejb.spi"/>
<module name="org.wildfly.clustering.server" services="import"/>
<module name="org.wildfly.security.manager"/>
</dependencies>
</module>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?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.wildfly.clustering.ejb.spi">
<properties>
<property name="jboss.api" value="private"/>
</properties>

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

<dependencies>
<module name="org.jboss.as.clustering.common"/>
<module name="org.jboss.ejb-client"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.marshalling"/>
<module name="org.jboss.modules"/>
<module name="org.jboss.msc"/>
<module name="org.wildfly.clustering.ejb.infinispan" services="import" optional="true"/>
</dependencies>
</module>
Original file line number Diff line number Diff line change
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.wildfly.clustering.web.infinispan;
package org.jboss.as.clustering.concurrent;

/**
* A scheduler for some task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,28 @@

<parent>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering</artifactId>
<artifactId>wildfly-clustering-ejb</artifactId>
<version>8.0.0.Beta2-SNAPSHOT</version>
</parent>

<artifactId>wildfly-clustering-ejb3-infinispan</artifactId>
<artifactId>wildfly-clustering-ejb-infinispan</artifactId>
<packaging>jar</packaging>

<name>WildFly: Clustered Stateful Session Bean cache Infinispan provider</name>
<name>WildFly: SFSB clustering - Infinispan integration</name>

<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-api</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-ejb-spi</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-infinispan</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-annotations</artifactId>
Expand All @@ -54,18 +66,20 @@
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-infinispan</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-api</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-ejb3</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>
-AgeneratedTranslationFilesPath=${project.basedir}/target/generated-translation-files
</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>

</project>
Loading