Hello
I am getting this error while communication the remote JMS queue
"weblogic.jms.common.JMSException: Connection not found"
My code is
public InitialContext getInitialContext()
throws NamingException, Exception
{
String location = CLASS_NAME + ".getInitialContext()";
log.info("Entering : " + location);
String initialCtx = PMTCProperties.getProperty("FAS_INI_CTC_FACT");
log.info("FAS initialCtx : " + initialCtx);
String providerURL = PMTCProperties.getProperty("FAS_URL");
log.info("FAS providerURL : " + providerURL);
String fasAccessUserName=PMTCProperties.getProperty("FAS_ACCESS_USER_NAME");
log.info("FAS fasAccessUserName : " + fasAccessUserName);
String fasAccessPassword=PMTCProperties.getProperty("FAS_ACCESS_USER_PASSWORD");
log.info("FAS fasAccessPassword : " + fasAccessPassword);
//prop.put(Context.INITIAL_CONTEXT_FACTORY, initialCtx);
//prop.put(Context.PROVIDER_URL, providerURL);
//Context ctx = new InitialContext(prop);
Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL,fasAccessUserName);
env.put(Context.SECURITY_CREDENTIALS,fasAccessPassword);
env.put(Context.INITIAL_CONTEXT_FACTORY, initialCtx);
env.put(Context.PROVIDER_URL, providerURL);
log.info("Exiting :" + location);
return new InitialContext(env);
}
public void init( Context ctx, final String queueName)
throws NamingException, JMSException ,Exception
{
qconFactory = (QueueConnectionFactory) ctx.lookup(PMTCProperties.getProperty("FAS_JMS_FACTORY"));
log.debug(" FAS qconFactory==="+qconFactory);
qcon = qconFactory.createQueueConnection();
log.debug(" FAS queue connection==="+qcon);
qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
log.debug(" FAS queue qsession==="+qsession);
queuereceive = (Queue) ctx.lookup(queueName);
log.debug(" FAS queue queuereceive==="+queuereceive);
qsender = qsession.createSender(queuereceive);
log.debug(" FAS queue qsender==="+qsender);
msg = qsession.createTextMessage();
qcon.start();
log.info("Exiting :" + location);
}
I am getting the error after line
log.debug(" FAS queue connection==="+qcon);
I will greateful to you if you help me to resolve this problem
Thanks
Manish
I am getting this error while communication the remote JMS queue
"weblogic.jms.common.JMSException: Connection not found"
My code is
public InitialContext getInitialContext()
throws NamingException, Exception
{
String location = CLASS_NAME + ".getInitialContext()";
log.info("Entering : " + location);
String initialCtx = PMTCProperties.getProperty("FAS_INI_CTC_FACT");
log.info("FAS initialCtx : " + initialCtx);
String providerURL = PMTCProperties.getProperty("FAS_URL");
log.info("FAS providerURL : " + providerURL);
String fasAccessUserName=PMTCProperties.getProperty("FAS_ACCESS_USER_NAME");
log.info("FAS fasAccessUserName : " + fasAccessUserName);
String fasAccessPassword=PMTCProperties.getProperty("FAS_ACCESS_USER_PASSWORD");
log.info("FAS fasAccessPassword : " + fasAccessPassword);
//prop.put(Context.INITIAL_CONTEXT_FACTORY, initialCtx);
//prop.put(Context.PROVIDER_URL, providerURL);
//Context ctx = new InitialContext(prop);
Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL,fasAccessUserName);
env.put(Context.SECURITY_CREDENTIALS,fasAccessPassword);
env.put(Context.INITIAL_CONTEXT_FACTORY, initialCtx);
env.put(Context.PROVIDER_URL, providerURL);
log.info("Exiting :" + location);
return new InitialContext(env);
}
public void init( Context ctx, final String queueName)
throws NamingException, JMSException ,Exception
{
qconFactory = (QueueConnectionFactory) ctx.lookup(PMTCProperties.getProperty("FAS_JMS_FACTORY"));
log.debug(" FAS qconFactory==="+qconFactory);
qcon = qconFactory.createQueueConnection();
log.debug(" FAS queue connection==="+qcon);
qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
log.debug(" FAS queue qsession==="+qsession);
queuereceive = (Queue) ctx.lookup(queueName);
log.debug(" FAS queue queuereceive==="+queuereceive);
qsender = qsession.createSender(queuereceive);
log.debug(" FAS queue qsender==="+qsender);
msg = qsession.createTextMessage();
qcon.start();
log.info("Exiting :" + location);
}
I am getting the error after line
log.debug(" FAS queue connection==="+qcon);
I will greateful to you if you help me to resolve this problem
Thanks
Manish