7 Replies Latest reply on Dec 10, 2009 6:04 AM by Marco Pehla

    Conterpart of UIL2XAConnectionFactory?

    Marco Pehla Newbie

      Dear all,

      I need to migrate an application actually using JBossMQ's UIL2XAConnectionFactory on an JBoss 4.0.2 AS. Its supposed to run now on an JBoss 4.2.3 with JBoss Messaging. I didn't found anything, is there an counterpart to the UIL2XAConnectionFactory or is anyone able to recommend a connection factory of JBoss Messaging that fulfills the same purpose?

      Regards,
      Marco

        • 1. Re: Conterpart of UIL2XAConnectionFactory?
          Yong Hao Gao Master

          Hi Marco,

          Sorry I need to ask what is UIL2XAConnectionFactory in JBossMQ? Can you explain the purpose of it so I can answer if there is an equivalent in JBM?

          Thanks
          Howard

          • 2. Re: Conterpart of UIL2XAConnectionFactory?
            Marco Pehla Newbie

            Hello Howard,

            since I didn't wrote the application, I don't know if there's a reason why this special UIL2XAConnectionFactory has been used. The following Wiki page is everything I know so far.

            http://www.jboss.org/community/wiki/ConfigUIL2

            I hope it helps.


            With kind regards,
            Marco

            • 3. Re: Conterpart of UIL2XAConnectionFactory?
              Tyronne Wickramarathne Newbie

               

              "Marco.Pehla" wrote:
              Hello Howard,

              since I didn't wrote the application, I don't know if there's a reason why this special UIL2XAConnectionFactory has been used. The following Wiki page is everything I know so far.

              http://www.jboss.org/community/wiki/ConfigUIL2

              I hope it helps.


              With kind regards,
              Marco


              AFAIK this is possible adding a JNDI. Reference in jms-ds.xml


              • 4. Re: Conterpart of UIL2XAConnectionFactory?
                Marco Pehla Newbie

                Here is the configuration file from JBoss MQ.

                uil2-service.xml:

                <server>
                
                 <!-- JBossMQ using the Unified Invocation Layer
                 All communication uses one socket connection -->
                
                 <mbean code="org.jboss.mq.il.uil2.UILServerILService"
                 name="jboss.mq:service=InvocationLayer,type=UIL2">
                
                 <!-- The server chain -->
                 <depends optional-attribute-name="Invoker">jboss.mq:service=Invoker</depends>
                 <!-- JNDI binding -->
                 <attribute name="ConnectionFactoryJNDIRef">ConnectionFactory</attribute>
                 <!-- JNDI binding for XA -->
                 <attribute name="XAConnectionFactoryJNDIRef">XAConnectionFactory</attribute>
                 <!-- The bind address -->
                 <attribute name="BindAddress">${jboss.bind.address}</attribute>
                 <!-- The bind port -->
                 <attribute name="ServerBindPort">8093</attribute>
                 <!-- The ping period in millis -->
                 <attribute name="PingPeriod">60000</attribute>
                 <!-- Whether tcp/ip does not wait for buffer fills -->
                 <attribute name="EnableTcpNoDelay">true</attribute>
                 <!-- Used to disconnect the client on the serverside if there is no activity -->
                 <!-- Ensure this is greater than the ping period -->
                 <attribute name="ReadTimeout">120000</attribute>
                 <!-- Used to disconnect the client on the clientside if there is no activity -->
                 <!-- Ensure this is greater than the ping period -->
                 <attribute name="ClientReadTimeout">120000</attribute>
                 <!-- The size of the buffer (in bytes) wrapping the socket -->
                 <!-- The buffer is flushed after each request -->
                 <attribute name="BufferSize">2048</attribute>
                 <!-- Large messages may block the ping/pong -->
                 <!-- A pong is simulated after each chunk (in bytes) for both reading and writing -->
                 <!-- It must be larger than the buffer size -->
                 <attribute name="ChunkSize">1000000</attribute>
                 </mbean>
                
                 <!-- Aliases UIL -> UIL2 for backwards compatibility
                 the deprecated UIL deployment can be found in docs/examples/jca -->
                 <mbean code="org.jboss.naming.NamingAlias" name="jboss.mq:service=InvocationLayer,type=UIL">
                 <attribute name="FromName">UILConnectionFactory</attribute>
                 <attribute name="ToName">ConnectionFactory</attribute>
                 <depends>jboss:service=Naming</depends>
                 </mbean>
                 <mbean code="org.jboss.naming.NamingAlias" name="jboss.mq:service=InvocationLayer,type=UILXA">
                 <attribute name="FromName">UILXAConnectionFactory</attribute>
                 <attribute name="ToName">XAConnectionFactory</attribute>
                 <depends>jboss:service=Naming</depends>
                 </mbean>
                 <mbean code="org.jboss.naming.NamingAlias"
                 name="jboss.mq:service=InvocationLayer,type=UIL2,alias=UIL2ConnectionFactory">
                 <attribute name="FromName">UIL2ConnectionFactory</attribute>
                 <attribute name="ToName">ConnectionFactory</attribute>
                 <depends>jboss:service=Naming</depends>
                 </mbean>
                 <mbean code="org.jboss.naming.NamingAlias"
                 name="jboss.mq:service=InvocationLayer,type=UIL2XA,alias=UIL2XAConnectionFactory">
                 <attribute name="FromName">UIL2XAConnectionFactory</attribute>
                 <attribute name="ToName">XAConnectionFactory</attribute>
                 <depends>jboss:service=Naming</depends>
                 </mbean>
                
                 <!--
                 Two JNDI bindings that act like jms client connections remotely
                 but have j2ee defined semantics inside JBoss
                 -->
                 <mbean code="org.jboss.naming.LinkRefPairService"
                 name="jboss.jms:alias=QueueConnectionFactory">
                 <attribute name="JndiName">QueueConnectionFactory</attribute>
                 <attribute name="RemoteJndiName">ConnectionFactory</attribute>
                 <attribute name="LocalJndiName">java:/JmsXA</attribute>
                 <depends>jboss:service=Naming</depends>
                 </mbean>
                 <mbean code="org.jboss.naming.LinkRefPairService"
                 name="jboss.jms:alias=TopicConnectionFactory">
                 <attribute name="JndiName">TopicConnectionFactory</attribute>
                 <attribute name="RemoteJndiName">ConnectionFactory</attribute>
                 <attribute name="LocalJndiName">java:/JmsXA</attribute>
                 <depends>jboss:service=Naming</depends>
                 </mbean>
                </server>


                As you can see, we find the implementation of the MBean in the class org.jboss.mq.il.uil2.UILServerILService. An alias UIL2XAConnectionFactory is defined and refers to XAConnectionFactory.

                Is it possible to do something similar with JBoss Messaging?

                Thank you in advance.

                regards
                Marco

                • 5. Re: Conterpart of UIL2XAConnectionFactory?
                  Yong Hao Gao Master

                  I'm sorry I don't know much about MQ. The UIL2XAConnectionFactory seems just a name for a XAConnectionFactory JMS object. I think you can post the question to JBoss MQ forum for more help.

                  • 6. Re: Conterpart of UIL2XAConnectionFactory?
                    Tyronne Wickramarathne Newbie

                     

                    "bershath27" wrote:
                    "Marco.Pehla" wrote:
                    Hello Howard,

                    since I didn't wrote the application, I don't know if there's a reason why this special UIL2XAConnectionFactory has been used. The following Wiki page is everything I know so far.

                    http://www.jboss.org/community/wiki/ConfigUIL2

                    I hope it helps.


                    With kind regards,
                    Marco


                    AFAIK this is possible adding a JNDI. Reference in jms-ds.xml


                    The UIL2XAConnectionFactory isn't used in JBossMessaging. In JBossMQ, the connection factories are named with having the invocation layer used for each connection factory.

                    The "UIL2" indicates that the given connection factory is using UIL2 layer for transport/invocations. This is just a wrapper for the XAConnection factory. However, in JBM we're using remoting and we don't use the former notation in JBM.

                    Since you don't/can't change your application's source code, simply add a JNDI binding on the ConnectionFactory, which is defined at connection-factories-service.xml.
                    ...
                    UIL2XAConnectionFactory
                    ...

                    eg :
                    <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
                     name="jboss.messaging.connectionfactory:service=ConnectionFactory"
                     xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
                     <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                     <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
                     <depends>jboss.messaging:service=PostOffice</depends>
                    
                     <attribute name="JNDIBindings">
                     <bindings>
                     <binding>/ConnectionFactory</binding>
                     <binding>/XAConnectionFactory</binding>
                     <binding>java:/ConnectionFactory</binding>
                     <binding>java:/XAConnectionFactory</binding>
                     <binding>UIL2XAConnectionFactory</binding> <!-- HERE -->
                     </bindings>
                     </attribute>
                     </mbean>


                    Thanks

                    • 7. Re: Conterpart of UIL2XAConnectionFactory?
                      Marco Pehla Newbie

                      Thank you Tyronne. Now with the binding it works.

                      Regards,
                      Marco