【发布时间】:2015-10-20 09:50:58
【问题描述】:
如何解决这个 JMSException?谢谢!
代理:本地主机 - 客户端:FS_Proceduer 已连接
javax.jms.InvalidClientIDException: Broker: localhost - Client: FS_Proceduer already connected from /127.0.0.1:56556
这是由这个方法触发的:
private void connectAndInitActiveMQ() throws JMSException{
logger.debug("It's ready to connect to jms service");
if(null != connection){
try{
logger.debug("Closing connection");
connection.close();
}catch(Exception e){
logger.error(e.getMessage(), e);
}
}
logger.debug("Creating a new connection");
logger.debug("Is queueConnectionFactory null? "+(queueConnectionFactory==null));
connection = queueConnectionFactory.createConnection();
logger.debug("Is the new connection null? "+(connection==null));
logger.debug("Starting the new connection");
connection.start();
logger.debug("Connected successfully: " + connection);
session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
queue = session.createQueue(queueName);
messageProducer = session.createProducer(queue);
}
是工厂问题吗?还是其他来源?
【问题讨论】:
-
你想运行什么?您执行的步骤究竟是什么并陷入此错误?除非你包括那些很难回答这个问题
标签: activemq