jmsService = (JmsService)ConfigBeansFactory.getConfigBeanByXPath(
configContext, ServerXPathHelper.XPATH_JMS_SERVICE);
if ((jmsService != null) && (jmsService.isEnabled())) {
JMSAdmin jmsAdmin = null;
JavaConfig javaConfig;
String java_home = null,
domainName = null,
mqInstanceName = null,
mqBin = null,
argArray[] = new String [ 4 ];
javaConfig = (JavaConfig)ConfigBeansFactory.getConfigBeanByXPath(
configContext, ServerXPathHelper.XPATH_JAVACONFIG);
java_home = javaConfig.getJavaHome();
mqBin = System.getProperty("com.sun.aas.imqBin");
domainName = ServerManager.instance().getDomainName();
jmsAdmin = IASJmsUtil.getJMSAdminFactory().getJMSAdmin();
/*
* Use utility method to construct MQ broker instance name
*/
mqInstanceName = IASJmsUtil.getBrokerInstanceName(domainName,
instanceName, jmsService);
argArray[0] = "-javahome";
argArray[1] = java_home;
argArray[2] = "-varhome";
String mqInstanceDir = instancesRoot + File.separator +
IASJmsUtil.MQ_DIR_NAME;
argArray[3] = mqInstanceDir;
/*
* Call MQ SPI method to delete the instance.
*/
jmsAdmin.deleteProviderInstance(mqBin, argArray, mqInstanceName);
}
}
catch (Exception e)
{
sLogger.log(Level.FINE, "mbean.del_jms_instance_failed", e);