WebSphere MQ7 キュー (Queue Manager QMA では queA とします) を EJB3 MDB にマップする必要があります。
を使用して MQ キュー マネージャーとキューを作成し、
crtmqm QMA
それを使用して開始しstrmqm MQA
ます。次に、ファイル ファイル名を書き、その行QMA.conf
を含め
DEFINE QLOCAL ('queA')
、コマンドを実行してから、
runmqsc QMA < QMA.conf
これら
strmqcsv MQA &
runmqlsr -m QMA -t TCP &
のすべての手順を mqm にログインしたユーザーとして実行します。
次に http://community.jboss.org/wiki/JBossEAP5IntegrationwithWebSphereMQ リンクに従い、RAR を jboss 5.1 に設定します。テスト接続を実行すると、これも成功しました。
そこに私が含めます
* channel - SYSTEM.DEF.SVRCONN
* hostName - localhost
* port - 1414
* queueManager - ExampleQM
* transportType - CLIENT
そして私のMDBには私が含めます
@MessageDriven( name="WMQMDBTest",
activationConfig =
{
@ActivationConfigProperty(propertyName="messagingType",propertyValue="javax.jms.MessageListener"),
@ActivationConfigProperty(propertyName = "destinationType",propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queA"),
@ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true"),
@ActivationConfigProperty(propertyName = "channel", propertyValue = "SYSTEM.DEF.SVRCONN"),
@ActivationConfigProperty(propertyName = "hostName", propertyValue = "localhost"),
@ActivationConfigProperty(propertyName = "queueManager", propertyValue = "QMA"),
@ActivationConfigProperty(propertyName = "port", propertyValue = "1414"),
@ActivationConfigProperty(propertyName = "transportType", propertyValue = "CLIENT"),
@ActivationConfigProperty(propertyName = "username", propertyValue = "mqm"),
@ActivationConfigProperty(propertyName = "password", propertyValue = "password")
})
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
@ResourceAdapter(value = "wmq.jmsra.rar")
Bean をデプロイしようとすると、次のように表示されます
DEPLOYMENTS IN ERROR:
Deployment "jboss.j2ee:ear=integration-1.0-SNAPSHOT.ear,jar=business-logic-1.0-SNAPSHOT.jar,
name=WMQMDBTest,service=EJB3" is in error due to the following reason(s):
javax.naming.NameNotFoundException: queA not bound