0 Replies Latest reply on Jun 14, 2006 6:26 AM by Michael Jürgens

    Two ConnectionFactoriesin one JVM

    Michael Jürgens Newbie

      We are using a jms queue as input from our customers (via servlet) into our application. This queue is backed by MaxDB.
      My intention is now to build a second queue which is backed by a local store (i.e. HSQLDB). This queue should receive customer requests while downtime of the main database (MaxDB).

      My approach was to build two instances of the JVM ConnectionFactory and bind them to different JNDI names (i.e java:/ConnectionFactrory/local and java:/ConnectionFactory/remote). This also for the XAConnectionFactories.

      It seems that this approach will not run. When starting JBoss I get the error

      [org.jboss.mq.il.jvm.JVMServerILService] Starting failed jboss.mq:service=InvocationLayer,type=JVM,db=local
      javax.naming.NameNotFoundException: ConnectionFactory not bound


      Any Help??

      jvm-il-service.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <server>
       <mbean code="org.jboss.mq.il.jvm.JVMServerILService"
       name="jboss.mq:service=InvocationLayer,type=JVM,db=local">
       <depends optional-attribute-name="Invoker">jboss.mq:service=Invoker,db=local</depends>
       <attribute name="ConnectionFactoryJNDIRef">java:/ConnectionFactory/local</attribute>
       <attribute name="XAConnectionFactoryJNDIRef">java:/XAConnectionFactory/local</attribute>
       <attribute name="PingPeriod">0</attribute>
       </mbean>
      
      </server>



      jms-ds.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <connection-factories>
       <!-- The JMS provider loader -->
       <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
       name="jboss.mq:service=JMSProviderLoader,name=JMSProvider,db=local">
       <attribute name="ProviderName">JMSProvider/local</attribute>
       <attribute name="ProviderAdapterClass">
       org.jboss.jms.jndi.JNDIProviderAdapter
       </attribute>
       <!-- The queue connection factory -->
       <attribute name="QueueFactoryRef">java:/XAConnectionFactory/local</attribute>
       <!-- The topic factory -->
       <attribute name="TopicFactoryRef">java:/XAConnectionFactory/local</attribute>
       </mbean>
      </connection-factories>
      
      


      jbossmq-service.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <server>
       <mbean code="org.jboss.mq.server.jmx.Invoker" name="jboss.mq:service=Invoker,db=local">
       <depends optional-attribute-name="NextInterceptor">jboss.mq:service=TracingInterceptor,db=local</depends>
       </mbean>
      
       <mbean code="org.jboss.mq.server.jmx.InterceptorLoader" name="jboss.mq:service=TracingInterceptor,db=local">
       <attribute name="InterceptorClass">org.jboss.mq.server.TracingInterceptor</attribute>
       <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager,db=local</depends>
       </mbean>
      
       <mbean code="org.jboss.mq.server.jmx.Queue"
       name="jboss.mq.destination:service=Queue,name=DLQLocal">
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager,db=local</depends>
       </mbean>
      </server>