关于ActiveMQ用UDP连接失败
summer85
2012-03-19
我用tcp协议连接和发送消息都正常,当我用UDP协议,将ActiveMQ的配置文件
<transportConnectors> <transportConnector name="udp" uri="udp://localhost:61618?trace=true"/> </transportConnectors> 然后在代码中进行相应的修改 factory = new ActiveMQConnectionFactory("udp://localhost:61618"); connection = factory.createConnection(); connection.start(); 然后会报异常: javax.jms.JMSException: org.apache.activemq.transport.RequestTimedOutIOException at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1298) at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1384) at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:504) (AbstractCommunication.java:109) Caused by: org.apache.activemq.transport.RequestTimedOutIOException at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:54) at org.apache.activemq.transport.reliable.ReliableTransport.request(ReliableTransport.java:81) at org.apache.activemq.transport.TransportFilter.request(TransportFilter.java:93) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1276) ... 6 more 不知各位有没有遇到过这种情况 |
|
viper_kenly
2012-10-19
没有啊,我现在遇到的问题是java.lang.ClassCastException: org.apache.activemq.ActiveMQConnection cannot be cast to org.apache.activemq.broker.Connection
我报这个错,一直在找解决的方法!你说的这个问题我没有遇到啊! |