//for EE to get port, host, adminusername, adminpassword.
//JmsService jmsService = ServerBeansFactory.getJmsServiceBean(ctx);
String defaultJmsHost = getJmsService().getDefaultJmsHost();
logFine("Default JMS Host :: " + defaultJmsHost);
JmsHost jmsHost = getJmsHost();
if (jmsHost != null) {//todo: && jmsHost.isEnabled()) {
JavaConfig javaConfig = (JavaConfig) Globals.get(JavaConfig.class); ;
String java_home = javaConfig.getJavaHome();
//Get broker type from JMS Service.
// String brokerType = jmsService.getType();
/*
* XXX: adjust the brokertype for the new DIRECT mode in 4.1
* uncomment the line below once we have an MQ integration
* that has DIRECT mode support
*/
String brokerType = adjustForDirectMode(getJmsService().getType());
String brokerPort = jmsHost.getPort();
brkrPort = brokerPort;
String adminUserName = jmsHost.getAdminUserName();
String adminPassword = JmsRaUtil.getUnAliasedPwd(jmsHost.getAdminPassword());
List jmsHostProps= getJmsService().getProperty();
String username = null;
String password = null;
if (jmsHostProps != null) {
for (int i =0;i <jmsHostProps.size(); i++) {
Property jmsProp =(Property)jmsHostProps.get(i);
String propName = jmsProp.getName();
String propValue = jmsProp.getValue();
if ("user-name".equals(propName)) {
username = propValue;
} else if ("password".equals(propName)) {
password = propValue;
}
// Add more properties as and when you want.
}
}
logFine("Broker UserName = " + username);
createMQVarDirectoryIfNecessary();
String brokerVarDir = getMQVarDir();
String tmpString = getJmsService().getStartArgs();
if (tmpString == null) {
tmpString = "";
}
String brokerArgs = tmpString;
//XX: Extract the information from the optional properties.
List jmsProperties = getJmsService().getProperty();
List jmsHostProperties = jmsHost.getProperty();
Properties jmsServiceProp = listToProperties(jmsProperties);
Properties jmsHostProp = listToProperties (jmsHostProperties);
jmsServiceProp.putAll(jmsHostProp);
if(jmsServiceProp.size() > 0) {