嗨,我在我的应用程序日志中收到以下异常堆栈跟踪。
20/09/2013 22.26.49 - Caught exception in Exception Strategy: Connection and domain type do not match
java.lang.IllegalArgumentException: Connection and domain type do not match
at org.mule.transport.jms.Jms102bSupport.createSession(Jms102bSupport.java:108)
at org.mule.transport.jms.JmsConnector.getSession(JmsConnector.java:579)
at org.mule.transport.jms.JmsConnector.getSession(JmsConnector.java:558)
at org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:141)
at org.mule.transport.jms.JmsMessageDispatcher.doDispatch(JmsMessageDispatcher.java:73)
at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:262)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:1895)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:765)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1288)
at org.mule.work.ScheduleWorkExecutor.doExecute(ScheduleWorkExecutor.java:41)
我不太明白它的实际含义,
有人可以解释一下连接和域类型不匹配是什么意思吗
并且可能是可能发生的示例场景。
使用配置的 mule 出站发送数据
<multicasting-router>
<jms:outbound-endpoint topic="SAMPLEMESSAGES" transformer-refs="DomToXml ObjectToJms" connector-ref="jmsConnector" />
</multicasting-router>
可以在此处找到连接器配置由于某种原因无法在此处粘贴 xml
就像弓箭手提到的那样,我确实查看了activeMQ源代码,只是将其粘贴在这里
@Override
public Session createSession(Connection connection, boolean topic, boolean transacted,
int ackMode, boolean noLocal) throws JMSException
{
if (connection == null)
{
throw new IllegalArgumentException("Connection is null");
}
if (topic && connection instanceof TopicConnection)
{
return ((TopicConnection) connection).createTopicSession(noLocal, ackMode);
}
else if (connection instanceof QueueConnection)
{
// for transacted sessions the ackMode is always ignored, but
// set it for readability (SESSION_TRANSACTION is recommented
// for this case).
return ((QueueConnection) connection).createQueueSession(
transacted, (transacted ? Session.SESSION_TRANSACTED : ackMode));
}
else
{
throw new IllegalArgumentException("Connection and domain type do not match, connection is of type " + connection.getClass().getName());
}
}
我想了解在什么情况下传入的客户端连接不是 topicConnection 或 queueConnection ,我可以编写哪些客户端代码来导致异常发生
谢谢