Class Utils
java.lang.Object
org.exoplatform.services.ispn.Utils
- Version:
- $Id$
- Author:
- Nicolas Filotto
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidconfigureJmx(org.infinispan.configuration.global.GlobalConfigurationBuilder configBuilder) Registers the beans of a cache manager in the MBean server of the top container.static voidconfigureSerialization(org.infinispan.configuration.global.GlobalConfigurationBuilder configBuilder, String configurationPath) Configures the serialization of a cache manager: the platform's marshaller, whose allow-list is the only one.static booleanloadJGroupsConfig(org.exoplatform.container.configuration.ConfigurationManager cfm, org.infinispan.configuration.global.GlobalConfiguration config, org.infinispan.configuration.global.GlobalConfigurationBuilder configBuilder) Load the JGroups configuration file thanks to theConfigurationManager.
-
Method Details
-
configureJmx
public static void configureJmx(org.infinispan.configuration.global.GlobalConfigurationBuilder configBuilder) Registers the beans of a cache manager in the MBean server of the top container. Infinispan no longer lets two cache managers of the same name share a JMX domain: the cache manager takes the domain of its configuration or, when it is taken, that domain suffixed with the first free index, as theduplicate-domainsattribute of the former configurations did. A stopped cache manager leaves the beans of its internal caches registered, so a domain holding any bean of that name is not free.- Parameters:
configBuilder- the global configuration of the cache manager, its name set
-
configureSerialization
public static void configureSerialization(org.infinispan.configuration.global.GlobalConfigurationBuilder configBuilder, String configurationPath) throws org.exoplatform.services.cache.ExoCacheInitException Configures the serialization of a cache manager: the platform's marshaller, whose allow-list is the only one. An allow-list in the Infinispan configuration would accept classes on the cache path only, so it is refused.- Parameters:
configBuilder- the global configuration of the cache managerconfigurationPath- the path of the Infinispan configuration it comes from- Throws:
org.exoplatform.services.cache.ExoCacheInitException- if the Infinispan configuration has an allow-list, or if the cluster allow-list cannot be built
-
loadJGroupsConfig
public static boolean loadJGroupsConfig(org.exoplatform.container.configuration.ConfigurationManager cfm, org.infinispan.configuration.global.GlobalConfiguration config, org.infinispan.configuration.global.GlobalConfigurationBuilder configBuilder) throws org.exoplatform.services.cache.ExoCacheInitException Load the JGroups configuration file thanks to theConfigurationManager. When the transport of the stack has a singleton name, the channel is a fork of the channel the node shares for that stack (SharedJGroupsTransport).- Parameters:
config- the global configuration from which the JGroups config will be extractedconfigBuilder- the related configuration builder- Returns:
trueif the JGoups config could be loaded successfully,falseif there were no JGroups config to load- Throws:
IllegalStateException- if the JGroups config could not be loadedorg.exoplatform.services.cache.ExoCacheInitException
-