客户端用的ActiveMQ,能连接JBoss发布的JMS消息吗

我们一个系统使用JMS进行通信。

发布消息那端用的是JBOSS。

我们这端用的是APACHE的AciveMQ,连接不成功。报的异常如下:

2011-4-25 17:34:27 org.springframework.jms.listener.DefaultMessageListenerContainer handleListenerSetupFailure
警告: Setup of JMS message listener invoker failed for destination 'queue://my-queue' - trying to recover. Cause: The JMS connection has failed: Unknown data type: 115
2011-4-25 17:34:27 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful
警告: Could not refresh JMS Connection for destination 'queue://my-queue' - retrying in 5000 ms. Cause: Unknown data type: 115
2011-4-25 17:34:32 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful
警告: Could not refresh JMS Connection for destination 'queue://my-queue' - retrying in 5000 ms. Cause: Channel was inactive for too long: /10.78.222.78:18199

我们的配置文件如下:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">

<!-- 自动扫描组件 -->
<context:component-scan base-package="com.huawei.jms" />

<!-- 创建连接工厂 -->
<bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://10.78.222.78:18199" />
</bean>

<!-- 声明消息目标 -->
<bean id="destination" class="org.apache.activemq.command.ActiveMQQueue">
    <constructor-arg index="0" value="my-queue" />
</bean>

<!-- 创建JMS模板 -->
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory" ref="jmsConnectionFactory" />
    <property name="defaultDestination" ref="destination" />
</bean>

<!-- listener container -->
<bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="jmsConnectionFactory" />
    <property name="destination" ref="destination" />
    <property name="messageListener" ref="receiver" />
</bean>

现在不确定为什么连接不上。请问用ActiveMQ,可以连接JBOSS发布的JMS消息吗?

[quote]貌似没有解决我的问题啊 [/quote]
我的意思是说,你的那个方案行不通。
MQ的客户端不能与JBOSS jms服务器端互联互通。

可能内部实现的协议格式不同。
一般来说,JMS只是调用接口级是符合规范的,即代码可以基本相同,
但没有强求内部协议是完全一样的。

[quote]貌似没有解决我的问题啊 [/quote]