this.sequenceInactivityTimeout = configuration.getRmFeature().getSequenceInactivityTimeout();
this.actualConcurrentInboundSequences = new AtomicLong(0);
this.maxConcurrentInboundSequences = configuration.getRmFeature().getMaxConcurrentSessions();
final BackingStoreFactory bsFactory = HighAvailabilityProvider.INSTANCE.getBackingStoreFactory(HighAvailabilityProvider.StoreType.IN_MEMORY);
/*
* We need to explicitly set the classloader that loads the Metro module classes
* to workaround the GF HA issue http://java.net/jira/browse/GLASSFISH-15084
* when value class is from the Java core lib.
*/
final String boundSequencesBsName = uniqueEndpointId + "_BOUND_SEQUENCE_BS";
final BackingStoreConfiguration<StickyKey, String> boundSequencesBsConfig = HighAvailabilityProvider.INSTANCE.initBackingStoreConfiguration(
boundSequencesBsName,
StickyKey.class,
String.class);
boundSequencesBsConfig.setClassLoader(this.getClass().getClassLoader());
final BackingStore<StickyKey, String> boundSequencesBs;
try {
boundSequencesBs = bsFactory.createBackingStore(boundSequencesBsConfig);
} catch (BackingStoreException ex) {
throw new RxRuntimeException(LocalizationMessages.WSRM_1142_ERROR_CREATING_HA_BACKING_STORE(boundSequencesBsName), ex);
}
this.boundSequences = HighlyAvailableMap.createSticky(
uniqueEndpointId + "_BOUND_SEQUENCE_MAP", boundSequencesBs);