ServiceDeploymentDescriptor mdd = ServiceConfigHelper.loadConfigFile(mainConfigFile);
ServiceDeploymentDescriptor pdd = ServiceConfigHelper.loadConfigFile(persistenceConfigFile);
MBeanConfigurationElement persistenceManagerConfig = ServiceConfigHelper.getServiceConfiguration(pdd,
"PersistenceManager");
persistenceManagerObjectName = sc.registerAndConfigureService(persistenceManagerConfig);
overrideAttributes(persistenceManagerObjectName, attrOverrides);
toStop.add(persistenceManagerObjectName);
sc.invoke(persistenceManagerObjectName, "create", new Object[0], new String[0]);
sc.invoke(persistenceManagerObjectName, "start", new Object[0], new String[0]);
MBeanConfigurationElement jmsUserManagerConfig = ServiceConfigHelper.getServiceConfiguration(pdd,
"JMSUserManager");
jmsUserManagerObjectName = sc.registerAndConfigureService(jmsUserManagerConfig);
overrideAttributes(jmsUserManagerObjectName, attrOverrides);
toStop.add(jmsUserManagerObjectName);
sc.invoke(jmsUserManagerObjectName, "create", new Object[0], new String[0]);
sc.invoke(jmsUserManagerObjectName, "start", new Object[0], new String[0]);
// regioster metadatasore
/*
* MBeanConfigurationElement securityStoreConfig = ServiceConfigHelper.getServiceConfiguration(mdd,
* "SecurityStore"); securityStoreObjectname = sc.registerAndConfigureService(securityStoreConfig);
* toStop.add(securityStoreObjectname);
*/
// register server peer as a service, dependencies are injected automatically
MBeanConfigurationElement serverPeerConfig = ServiceConfigHelper.getServiceConfiguration(mdd, "ServerPeer");
// overwrite the file configuration, if needed
overrideServerPeerConfiguration(serverPeerConfig,
serverPeerID,
defaultQueueJNDIContext,
defaultTopicJNDIContext);
serverPeerObjectName = sc.registerAndConfigureService(serverPeerConfig);
overrideAttributes(serverPeerObjectName, attrOverrides);
// ServerPeer serverPeer = (ServerPeer) sc.getMBeanServer().
log.debug("starting JMS server");
toStop.add(serverPeerObjectName);
sc.getMBeanServer()
.setAttribute(serverPeerObjectName, new Attribute("SecurityStore", sc.startSecurityStore()));
sc.invoke(serverPeerObjectName, "create", new Object[0], new String[0]);
sc.invoke(serverPeerObjectName, "start", new Object[0], new String[0]);
MBeanConfigurationElement postOfficeConfig = ServiceConfigHelper.getServiceConfiguration(pdd, "PostOffice");
postOfficeObjectName = sc.registerAndConfigureService(postOfficeConfig);
sc.setAttribute(postOfficeObjectName, "Clustered", clustered ? "true" : "false");
overrideAttributes(postOfficeObjectName, attrOverrides);