[jboss-as7-dev] JNDI access to JMS connection factory

Kabir Khan kabir.khan at jboss.com
Fri May 6 04:02:08 EDT 2011


standalone.xml
        <subsystem xmlns="urn:jboss:domain:messaging:jms:1.0">
            <connection-factory name="InVmConnectionFactory">
               <connectors>
                  <connector-ref connector-name="in-vm" backup-connector-name="netty"/>
               </connectors>
               <entries>
                  <entry name="java:/ConnectionFactory" />
               </entries>
            </connection-factory>
            <connection-factory name="RemoteConnectionFactory">
               <connectors>
                  <connector-ref connector-name="netty" backup-connector-name="in-vm"/>
               </connectors>
               <entries>
                  <entry name="RemoteConnectionFactory" />
               </entries>
            </connection-factory>
            <queue name="testQueue">
               <entry name="queue/test" />
            </queue>
            <topic name="testTopic">
               <entry name="topic/test" />
            </topic>
        </subsystem>

InVmConnectionFactory and the queues are accessible in JNDI in-vm, from https://github.com/jbossas/jboss-as/blob/master/demos/src/main/java/org/jboss/as/demos/jms/mbean/Test.java:

        InitialContext ctx = new InitialContext();

        QueueConnectionFactory qcf = (QueueConnectionFactory)ctx.lookup("java:/ConnectionFactory");
        conn = qcf.createQueueConnection();
        conn.start();
        queue = (Queue)ctx.lookup("queue/test");

RemoteConnectionFactory will be available from outside the jvm once remote jndi is implemented

On 6 May 2011, at 08:08, Heiko Braun wrote:

> 
> 
> [domain at localhost:9999 /] /profile=default/subsystem=jms/connection-factory=RemoteConnectionFactory:read-resource
> {
>    "outcome" => "success",
>    "result" => {
>        "connector" => {"netty" => {"backup-connector-name" => "in-vm"}},
>        "entries" => ["RemoteConnectionFactory"]
>    },
>    "compensating-operation" => undefined
> }
> 
> 
> 
> Isn't it "java:/RemoteConnectionFactory" ?
> 
> 
> Ike
> 
> On May 5, 2011, at 6:49 PM, Marius Bogoevici wrote:
> 
>> S7 does (or will) provide a JNDI-accessible JMS connection factory, e.g. via "java:/JmsXA" or similar (perhaps in the java:jboss namespace). Can anyone help me with more deta
> 
> 
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev




More information about the jboss-as7-dev mailing list