persistenceStoreType = "file";
}
}
BackingStoreFactory factory = null;
try {
factory = habitat.getComponent(BackingStoreFactory.class, persistenceStoreType);
} catch (Exception ex) {
_logger.log(Level.WARNING, "Could not instantiate backing store factory for type: " + persistenceStoreType, ex);
persistenceStoreType = "noop";
try {
factory = habitat.getComponent(BackingStoreFactory.class, persistenceStoreType);
} catch (Exception ex2) {
_logger.log(Level.WARNING, "Could not instantiate backing store factory for type: " + persistenceStoreType, ex2);
throw new BackingStoreException("Could not instantiate BackingStore Factory for persistence type: " + persistenceStoreType, ex);
}
}
BackingStoreConfiguration<Serializable, SimpleMetadata> conf = new BackingStoreConfiguration<Serializable, SimpleMetadata>();
String storeName = ejbDescriptor.getName() + "-" + ejbDescriptor.getUniqueId() + "-BackingStore";
_logger.log(Level.INFO, "StatefulContainerBuilder.buildStoreManager() storeName: " + storeName);
String subDirName = "";
subDirName += ejbDescriptor.getName() + "-" + ejbDescriptor.getUniqueId();
conf.setShortUniqueName(""+ejbDescriptor.getUniqueId()).setStoreName(storeName)
.setStoreType(persistenceStoreType)
.setBaseDirectory(new File(ejbContainerConfig.getSessionStore(), subDirName))
.setKeyClazz(Serializable.class)
.setValueClazz(SimpleMetadata.class)
.setClassLoader(StatefulContainerBuilder.class.getClassLoader());
Map<String, Object> vendorMap = conf.getVendorSpecificSettings();
vendorMap.put("local.caching", true);
vendorMap.put("start.gms", false);
vendorMap.put("async.replication", asyncReplication);
vendorMap.put("broadcast.remove.expired", false);
vendorMap.put("value.class.is.thread.safe", true);
vendorMap.put("key.transformer", keyGen);
if (gmsAdapterService != null) {
GMSAdapter gmsAdapter = gmsAdapterService.getGMSAdapter();
if (gmsAdapter != null) {
conf.setClusterName(gmsAdapter.getClusterName());
conf.setInstanceName(gmsAdapter.getModule().getInstanceName());
}
}
try {
sfsbContainer.setSfsbHaPersistenceType(persistenceStoreType);
this.backingStore = factory.createBackingStore(conf);
} catch (Exception ex) {
_logger.log(Level.WARNING, "Could not instantiate BackingStore for persistence type: " + persistenceStoreType, ex);
throw new BackingStoreException("Could not instantiate BackingStore for persistence type: " + persistenceStoreType, ex);
}
_logger.log(Level.WARNING, "StatefulContainerbuilder instantiated store: " +