2 Replies Latest reply on Jan 22, 2015 6:19 AM by Eduardo Martins

    JMS Connection Factories deployment

    Arnaud MERGEY Newbie

      Hello,

       

      With JBoss AS 6, it was possible to deploy connection factories as well as JMS destinations using a XML file.

      It seems than since JBoss AS 7 and wildfly 8 only Queues and Topics can be deployed like this, and it is not possible anymore for Connection Factories, am I right ?

      or is there any way to deploy connection factories ?

      I tried copying this xml in deployements folder this but it does not work for connection factoy:

       

      <messaging-deployment xmlns="urn:jboss:messaging-deployment:1.0">

        <hornetq-server>

        <jms-connection-factories>

        <connection-factory name="InVmConnectionFactory">

        <connectors>

        <connector-ref connector-name="in-vm" />

        </connectors>

        <entries>

        <entry name="java:jboss/exported/jms/ConnectionFactory" />

        <entry name="jms/ConnectionFactory" />

        </entries>

        </connection-factory>

        </jms-connection-factories>

        <jms-destinations>

        <jms-queue name="TestQueue">

        <entry name="jms/Queue" />

        <entry name="java:jboss/exported/jms/Queue" />

        </jms-queue>

        </jms-destinations>

        </hornetq-server>

      </messaging-deployment>

       

      Best regards

        • 1. Re: JMS Connection Factories deployment
          Justin Bertram Master

          As far as I know the only way to deploy a connection factory via XML is using the standalone*.xml or domain.xml files.

          • 2. Re: JMS Connection Factories deployment
            Eduardo Martins Apprentice

            From the Java EE 7 specification:

            EE.5.18.4 JMS Connection Factory Resource Definition

            An application may define a JMS ConnectionFactory resource.

            The JMS ConnectionFactory resource may be defined in any of the JNDI

            namespaces described in Section EE.5.2.2, “Application Component Environment Namespaces”.

             

            A JMS ConnectionFactory resource may be defined in a web module, EJB module, application client module, or application deployment descriptor using the jms-connection-factory element.

            For example:

                <jms-connection-factory>

                    <description>

            Sample JMS ConnectionFactory definition

            </description>

            <name>java:app/MyJMSCF</name> <class-name>javax.jms.QueueConnectionFactory</class-name> <resource-adapter>myJMSRA</resource-adapter> <user>scott</user>

            <password>secret</password> <client-id>MyId</client-id> <property>

                      <name>Property1</name>

                      <value>10</value>

                    </property>

                    <property>

                      <name>Property2</name>

            <value>20</value>

            </property> <transactional>false</transactional> <max-pool-size>30</max-pool-size> <min-pool-size>20</min-pool-size>

            </jms-connection-factory>

             

            A JMS ConnectionFactory resource may also be defined using the JMSConnectionFactoryDefinition annotation on a container-managed class, such as a servlet or enterprise bean class.

            For example:

            @JMSConnectionFactoryDefinition( name="java:app/MyJMSCF", className="javax.jms.QueueConnectionFactory", resourceAdapter="myJMSRA")