1 2 3 Previous Next 31 Replies Latest reply on Aug 13, 2007 4:10 PM by rosama77 Go to original post
      • 30. Re: connectionFactoryJndiName config property
        rosama77

        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.

        • 31. Re: connectionFactoryJndiName config property
          rosama77

           

          "rosama77" wrote:
          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 -->
          <mbean code="jmx.service.wsmq.WSMQConnectionFactory"
          name="jmx.service.wsmq:service=MQQueueConnectionFactory">
          <attribute name="JndiName">WSMQXAMQFACTORY</attribute>
          <attribute name="JMSStyle">Queue</attribute>
          <attribute name="IsXA">false</attribute>
          <attribute name="QueueManagerName">XMYMXLW01L.QM</attribute>
          <attribute name="HostName">199.99.99.99</attribute>
          <attribute name="Port">1420</attribute>
          <attribute name="Channel">tt.SV</attribute>
          <attribute name="TransportType">MQJMS_TP_CLIENT_MQ_TCPIP</attribute>
          <depends>jboss:service=Naming</depends>
          </mbean>

          <mbean code="jmx.service.wsmq.WSMQDestination"
          name="jmx.service.wsmq:service=WSMQRequestQueue">
          <attribute name="JndiName">Q.MXTOB.MX</attribute>
          <attribute name="JMSStyle">Queue</attribute>
          <attribute name="QueueManagerName">XMYMXLW01L.QM</attribute>
          <attribute name="DestinationName">Q.MXTOB.MX</attribute>
          <depends>jboss:service=Naming</depends>
          </mbean>

          <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=RequestQueue">
          <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
          </mbean>


          This in webspherems-ds.xml (deploy/jms directory):


          <?xml version="1.0" encoding="UTF-8"?>

          <connection-factories>

          <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
          name="jboss.mq:service=JMSProviderLoader,name=WSMQJMSProvider">
          <attribute name="ProviderName">WSMQJMSProvider</attribute>
          <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
          <attribute name="QueueFactoryRef">WSMQXAMQFACTORY</attribute>
          <attribute name="TopicFactoryRef">WSMQXAMQFACTORY</attribute>
          </mbean>

          </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">
          <description></description>
          <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>
          <method>
          <ejb-name>ProdOrder</ejb-name>
          <method-name>onMessage</method-name>
          <method-params>
          <method-param>javax.jms.Message</method-param>
          </method-params>
          </method>
          <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">
          <jboss>
          <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>
          <name>wsmq-message-driven-bean</name>
          <invoker-mbean>default</invoker-mbean>
          <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
          <proxy-factory-config>
          <JMSProviderAdapterJNDI>WSMQJMSProvider</JMSProviderAdapterJNDI>
          <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
          <CreateJBossMQDestination>true</CreateJBossMQDestination>
          <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
          <MinimumSize>1</MinimumSize>
          <MaximumSize>15</MaximumSize>
          <KeepAliveMillis>30000</KeepAliveMillis>
          <MaxMessages>1</MaxMessages>
          <MDBConfig>
          <ReconnectIntervalSec>10</ReconnectIntervalSec>
          </MDBConfig>
          </proxy-factory-config>
          </invoker-proxy-binding>
          </invoker-proxy-bindings>

          </jboss>

          Greetings, Hope this helps.


          1 2 3 Previous Next