this.contextNode = new ContextNode(ContextNode.MAP_MARKER_TAG, instanceName,
this.glob.getContextNode()); // TODO: pass from real parent like TopicInfo
this.mbeanHandle = this.glob.registerMBean(this.contextNode, this);
// StoragePluginManager pluginManager = (StoragePluginManager)this.glob.getObjectEntry("org.xmlBlaster.engine.msgstore.StoragePluginManager");
StoragePluginManager pluginManager = glob.getStoragePluginManager();
QueuePropertyBase queuePropertyBase = (QueuePropertyBase)userData;
//instantiate and initialize the underlying queues
String defaultTransient = pluginProperties.getProperty("transientMap", "RAM,1.0").trim();
if (defaultTransient.startsWith(getType())) {
log.severe("Cache storage configured with transientMap=CACHE, to prevent recursion we set it to 'RAM,1.0'");
defaultTransient = "RAM,1.0";
}
QueuePropertyBase ramProps = createRamCopy(queuePropertyBase);
ramProps.setEmbedded(true);
this.transientStore = pluginManager.getPlugin(defaultTransient, uniqueQueueId, ramProps);
if (log.isLoggable(Level.FINE)) log.fine("Created transient part:" + this.transientStore.toXml(""));
try {
String defaultPersistent = pluginProperties.getProperty("persistentMap", "JDBC,1.0").trim();
if (defaultPersistent.startsWith(getType())) {
log.severe("Cache storage configured with persistentMap=CACHE, to prevent recursion we set it to 'JDBC,1.0'");
defaultPersistent = "JDBC,1.0";
}
boolean oldEmbedded = queuePropertyBase.isEmbedded(); // since a CACHE could be inside a CACHE
queuePropertyBase.setEmbedded(true);
this.persistentStore = pluginManager.getPlugin(defaultPersistent, uniqueQueueId, queuePropertyBase);
queuePropertyBase.setEmbedded(oldEmbedded); // since it is not a clone we make sure to reset it to its original
this.isConnected = true;
// to be notified about reconnections / disconnections
// this.glob.getJdbcQueueManager(this.storageId).registerStorageProblemListener(this);