3 Replies Latest reply on Jun 17, 2014 12:48 PM by Nuno Duarte

    JMS (Pooled) Connection Factory | add entry through the command line interface

    Nuno Duarte Newbie

      Hello guys,

       

      I'm trying to automate some configurations in standalone.xml file through the command line interface (jboss-cli) of Wildfly 8.1.0 Final.

      I'm building some (cli) scripts and I have managed to successfully automate most of the tasks, except in a case where I need to declare specific namespaces inside "<entries>" element of the "pooled-connection-factory" element, as shown below (marked as Bold):

       

      (...)

      <subsystem xmlns="urn:jboss:domain:messaging:2.0">

      (...)

      <pooled-connection-factory name="hornetq-ra">

        <transaction mode="xa"/>

        <connectors>

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

        </connectors>

          <entries>

              <entry name="java:/JmsXA"/>

              <entry name="java:jboss/DefaultJMSConnectionFactory"/>

              <entry name="java:/<my_application_namespace>"/>

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

          </entries>

      </pooled-connection-factory>

      (...)

      <subsystem/>

      (...)

       

       

      I've made some attempts in command line, but without success. So, I decided to open a thread here.

      I'm sorry if this sounds too basic, but I would like to ask some help about the correct command that performs the configuration that I exposed above.

       

      Can anyone help me?

       

      Thanks in advance,

      Nuno

        • 1. Re: JMS (Pooled) Connection Factory | add entry through the command line interface
          Andy Taylor Master

          This is the HornetQ user forum, you're probably better off trying on the Wildfly forum for a better audience.

          • 2. Re: JMS (Pooled) Connection Factory | add entry through the command line interface
            Jeff Mesnil Master

            You can not do this. Pooled-connection-factory that are defined in the standalone-full.xml configuration files are global to the server and not dependent on your application namespace.

            The resources are created before your application is deployed so there is no corresponding namespace they could be bound to.

             

            Why do you want to do that? This default connection factory is available to your application "for free" anyway if you inject it using an @Resource annotation.

            • 3. Re: JMS (Pooled) Connection Factory | add entry through the command line interface
              Nuno Duarte Newbie

              Hi Jeff,

               

              Sorry, Jeff! You're absolutely right.

              I'm not too much experienced with the messaging topic and I should have paid more attention to the documentation that I (actually) have read:

               

              "The entry declaration of a connection-factory or a pooled-connection-factory specifies the JNDI name under which the factory will be exposed.  Only JNDI names bound in the"java:jboss/exported" namespace are available to remote clients.  If a connection-factory has an entry bound in the "java:jboss/exported" namespace a remote client would look-up the connection-factory using the text after "java:jboss/exported".  For example, the "RemoteConnectionFactory" is bound by default to "java:jboss/exported/jms/RemoteConnectionFactory" which means a remote client would look-up this connection-factory using "jms/RemoteConnectionFactory".  A pooled-connection-factory should not have any entry bound in the "java:jboss/exported" namespace because a pooled-connection-factory is not suitable for remote clients."


              Thanks a lot for the feedback, guys!

               

              And also I apologize for posting this discussion in the wrong forum. At first glance, It seemed reasonable for me to post it here.

               

              Regards,

              Nuno