What is the distributable-ejb subsystem in EAP 8
The distributable-ejb
subsystem was introduced to provide decoupling between the ejb3 subsystem and the relevant clustering subsystems. Similar to what the distributable-web
subsystem did for the undertow and clustering subsystems. The legacy EAP 7.x ejb/clustering/infinispan configuration will continue to work in EAP 8.0 and require no migration of the configuration, thus the usage of distributable-ejb
is optional way of configuring and abstracting the clustering/infinispan configuration out of the ejb3 subsystem.
Below are some examples showing how the old clustering configuration can be moved out of the ejb3 subsystem and into the distributable-ejb subsystem.
cache factories
The cache factories that were configured in the ejb3 subsystem such as :
<subsystem xmlns="urn:jboss:domain:ejb3:10.0">
...
<caches>
...
<!-- a passivating cache factory with its passivation store -->
<cache name="distributable-cache" passivation-store="infinispan"/>
</caches>
...
<passivation-stores>
<passivation-store name="infinispan" cache-container="ejb" max-size="10000">
</passivation-stores>
...
</subsystem>
Can now configured in the distributable-ejb
such as:
<subsystem xmlns="urn:jboss:domain:ejb3:10.0">
...
<caches>
<!-- a non-passivating cache factory -->
<simple-cache name="simple-cache"/>
<!-- a passivating cache factory with its bean management provider -->
<distributable-cache name="distributable-cache" bean-management="infinispan"/>
</caches>
...
</subsystem>
The bean management provider can now configured separately in the distributable-ejb subsystem:
<subsystem xmlns="urn:jboss:domain:distributable-ejb:1.0" default-bean-management="infinispan">
<infinispan-bean-management name="infinispan" cache-container="ejb" cache="dist" max-active-beans="10000"/>
...
</subsystem>
client mappings registries
The client mappings registries were configured as follows:
<subsystem xmlns="urn:jboss:domain:ejb3:10.0">
...
<remote cluster="ejb" connectors="http-remoting-connector" thread-pool-name="default">
<channel-creation-options>
<option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>
</channel-creation-options>
</remote>
...
</subsystem>
Here, the "cluster" attribute identifies the group name of the infinispan cache backing the client mappings registry, used to store client mappings for this server. The implementation of the client mappings registry is hard-wired into the ejb3 subsystem.
In EAP 8, the client mappings registries can now configured as follows:
<subsystem xmlns="urn:jboss:domain:ejb3:10.0">
...
<remote connectors="http-remoting-connector" thread-pool-name="default">
<channel-creation-options>
<option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>
</channel-creation-options>
</remote>
...
</subsystem>
The "cluster" attribute can now be removed from the remote element of the ejb3 subsystem, and instead specified in the client mappings registry element of the distributable-ejb subsystem:
<subsystem xmlns="urn:jboss:domain:distributable-ejb:1.0" default-bean-management="infinispan">
...
<infinispan-client-mappings-registry cache-container="ejb" cache="client-mappings"/>
</subsystem>
Default Configuration
Here is an example of the way the new subsystem will look, for the case of specifying a bean management provider:
<subsystem xmlns="urn:jboss:domain:distributable-ejb:1.0" default-bean-management="infinispan">
<infinispan-bean-management name="infinispan" cache-container="ejb" cache="dist" max-size="10"/>
</subsystem>
and here is its corresponding integration into the ejb3 subsystem:
<subsystem xmlns="urn:jboss:domain:ejb3:10.0">
...
<caches>
<simple-cache name="simple-cache"/>
<distributable-cache name="distributable-cache" bean-management="infinispan"/>
</caches>
...
</subsystem>
Note that the distributable-cache element takes an optional bean-management attribute, which is a reference to the bean management provider in the new subsystem. A similar arrangement will be used for client mappings registries. When unspecified, the default-bean-management profile is used.
Related
JBEAP-26877 - WFLY-19303 - EJB remote service requiring cluster instead of using distributable-ejb
Comments