[jboss-user] [Messaging, JMS & JBossMQ] - Re: connectionFactoryJndiName config property
rosama77
do-not-reply at jboss.com
Mon Aug 13 13:40:30 EDT 2007
If this work for you, this was my solution, applying scenarios 2 from the documentation examples:
modify jboss-service.xml (there I defined a ConnectionFactory):
<!-- start new production module bean for wms -->
WSMQXAMQFACTORY
Queue
false
XMYMXLW01L.QM
165.75.232.56
1420
CANADA.SV
MQJMS_TP_CLIENT_MQ_TCPIP
jboss:service=Naming
Q.MXTOB.MX
Queue
XMYMXLW01L.QM
Q.MXTOB.MX
jboss:service=Naming
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
This in webspherems-ds.xml (deploy/jms directory):
<?xml version="1.0" encoding="UTF-8"?>
<connection-factories>
WSMQJMSProvider
org.jboss.jms.jndi.JNDIProviderAdapter
WSMQXAMQFACTORY
WSMQXAMQFACTORY
</connection-factories>
I have to create a jar file with jmx clases for classes, like jmx.service.wsmq.WSMQDestination (if you want, i can send you the jar file).
And in ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar id="ejb-jar_ID">
<display-name>WMSLoadMQEJB</display-name>
<enterprise-beans>
<message-driven id="ProdOrder">
<ejb-name>ProdOrder</ejb-name>
<ejb-class>ca.itcan.wmsloadmq.ejb.ProdOrderBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref id="ResourceRef_1168271268760">
<res-ref-name>jdbc/WMS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<ejb-name>ProdOrder</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Jboss.xml:
<?xml version="1.0"?>
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 3.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
<enterprise-beans>
<message-driven>
<ejb-name>ProdOrder</ejb-name>
<configuration-name>WSMQ Message Driven Bean</configuration-name>
<destination-jndi-name>Q.MXTOB.MX</destination-jndi-name>
</message-driven>
</enterprise-beans>
<!-- container configuration for WSMQ -->
<container-configurations>
<container-configuration extends="Standard Message Driven Bean">
<container-name>WSMQ Message Driven Bean</container-name>
<invoker-proxy-binding-name>wsmq-message-driven-bean</invoker-proxy-binding-name>
</container-configuration>
</container-configurations>
<!-- The JmsProviderAdapterJNDI must match the ProviderName in SERVER_HOME/deploy/jms/webspheremq-ds.xml file. -->
<invoker-proxy-bindings>
<invoker-proxy-binding>
wsmq-message-driven-bean
<invoker-mbean>default</invoker-mbean>
<proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
<proxy-factory-config>
WSMQJMSProvider
StdJMSPool
true
<!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
1
15
30000
1
10
</proxy-factory-config>
</invoker-proxy-binding>
</invoker-proxy-bindings>
Greetings, Hope this helps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073664#4073664
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073664
More information about the jboss-user
mailing list