我正在尝试将运行jboss3.x的系统升级到jboss5.1。系统使用MDB监听WebSphere MQ中的队列,因此“消息驱动”通过“配置名称”连接到容器/“调用代理绑定”-我想这是连接到远程队列的标准方式。
JBoss 5.1的问题在于jboss_5_1.xsd
没有configuration-name
和invoker-proxy-binding
。到目前为止,我发现所有关于连接JBoss 5.1MDB连接到远程队列的示例都没有使用jboss_5_1.xsd
,而是使用了jboss_5_0.dtd
。
使用jboss_5_0.dtd
会错过什么,在5.1中应该如何配置?
发布于 2013-02-07 23:54:55
嗯,我知道这是一个有点老的问题,但不管怎样:我使用ejb3-interceptors-aop.xml中定义的激活配置让它在5.1上工作
<domain name="zzz.ejb.mdb.MessageReceiver" extends="Message Driven Bean" inheritBindings="true">
<!-- annotation must be documented on one line without CR/LF -->
<annotation expr="!class(@org.jboss.ejb3.annotation.DefaultActivationSpecs)">
@org.jboss.ejb3.annotation.DefaultActivationSpecs ({ @javax.ejb.ActivationConfigProperty(propertyName = "messagingType", propertyValue="javax.jms.MessageListener"), @javax.ejb.ActivationConfigProperty(propertyName = "destinationType",propertyValue = "javax.jms.Queue"), @javax.ejb.ActivationConfigProperty(propertyName = "destination", propertyValue = "zzz/jms/LocalQueue"), @javax.ejb.ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true"), @javax.ejb.ActivationConfigProperty(propertyName = "queueManager", propertyValue = "ZZZ.QMGR"), @javax.ejb.ActivationConfigProperty(propertyName = "hostName", propertyValue = "172.21.100.10"), @javax.ejb.ActivationConfigProperty(propertyName = "port", propertyValue = "1415"), @javax.ejb.ActivationConfigProperty(propertyName = "transportType", propertyValue = "CLIENT"), @javax.ejb.ActivationConfigProperty(propertyName = "maxPoolDepth", propertyValue = "1")})
</annotation>
</domain>
请注意,注释在一行中。
此外,我还为队列定义了一个mbean (如下所示):
<mbean code="org.jboss.resource.deployment.AdminObject" name="jboss.jca:service=WASDestination,name=zzz/jms/LocalQueue">
<attribute name="JNDIName">zzz/jms/LocalQueue</attribute>
<depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</depends>
<attribute name="Type">javax.jms.Queue</attribute>
<attribute name="Properties">
baseQueueManagerName=ZZZ.QMGR
baseQueueName=ZZZ.QUEUE
</attribute>
</mbean>
我希望这能帮到你
https://stackoverflow.com/questions/8586597
复制相似问题