3 Replies Latest reply on Nov 27, 2006 12:48 PM by weston.price

    Creating Own Connection Factory for Topic - HELP

    cnng

      Hi,

      I understand that by default, JBoss has a "ConnectionFactory" that can be used when looking up my Queue / Topic.

      However, I would like to create my own ConnectionFactory, for e.g. "UserConnectionFactory and bind it to my Queue / Topic.

      This is the link I found but am not sure where I need to set it.

      http://wiki.jboss.org/wiki/Wiki.jsp?page=JGroupsJMS

      I am using JBoss 4.0.4.

      Any help is very much appreciated.

        • 1. Re: Creating Own Connection Factory for Topic - HELP
          jaikiran

          Add this entry to the uil2-service.xml file present in %JBOSS_HOME%\server\default\deploy\jms folder:

          <mbean code="org.jboss.naming.LinkRefPairService"
           name="jboss.jms:alias=UserConnectionFactory">
           <attribute name="JndiName">UserTopicConnectionFactory</attribute>
           <attribute name="RemoteJndiName">UserConnectionFactory</attribute>
           <attribute name="LocalJndiName">java:/UserJmsXA</attribute>
           <depends>jboss:service=Naming</depends>
           </mbean>


          This will create the connection factory for you. But i havent done this before. I just tried it now and i was able to see the new entry in the jmx-console



          • 2. Re: Creating Own Connection Factory for Topic - HELP
            cnng

            Hi Jaikiran


            Thanks! But how do I tie the ConnectionFactory to my Queue or Topic?

            If you refer to the link I sent, it is slightly different and there's a mapping between the Queue/Topic and Connection Factory

            • 3. Re: Creating Own Connection Factory for Topic - HELP
              weston.price

              You would need to set up your own JNDIProviderAdapter and referenced the ConnectionFactory and your EJB deployments also referenced. Take a look the jms-ds.xml file in the deploy/jms directory for an example.