0 Replies Latest reply on Nov 10, 2006 8:21 AM by edward winston

    Problems creating a new JMS provider

    edward winston Newbie

      I am tring to create a new JMS provider using the standard jboss provider. I created a custom myds-ds.xml that contains the following :

       <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
       name="jboss.mq:service=JMSProviderLoader,name=myJMSProvider">
       <attribute name="ProviderName">myJMSProvider</attribute>
       <attribute name="ProviderAdapterClass"> org.jboss.jms.jndi.JNDIProviderAdapter </attribute>
       <!-- The combined connection factory -->
       <attribute name="FactoryRef">java:/myConnectionFactory</attribute>
       <!-- The queue connection factory -->
       <attribute name="QueueFactoryRef">java:/myQueueConnectionFactory</attribute>
       <!-- The topic factory -->
       <attribute name="TopicFactoryRef">java:/myTopicConnectionFactory</attribute>
       </mbean>
      
       <no-tx-connection-factory>
       <jndi-name>hpomsTopicConnectionFactory</jndi-name>
       <rar-name>jms-ra.rar</rar-name>
       <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
       <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
       <config-property name="JmsProviderAdapterJNDI" type="java.lang.String"
       >java:/hpomsJMSProvider</config-property>
       <max-pool-size>20</max-pool-size>
       </no-tx-connection-factory>
      


      The factories show up in the jndi context, but when i try to use them with the following code :

       Topic jcTopic = lookupJobCancelTopic(context);
       TopicConnectionFactory tcf = lookupTopicConnectionFactory(context);
       TopicConnection tc = tcf.createTopicConnection();
       tc.start();
       ConnectionMetaData md = tc.getMetaData();
       TopicSession ts = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
       TopicSubscriber tr = ts.createSubscriber(jcTopic);
      


      it fails when trying to create the topic session. If I change the deployment descriptor to use the default JMSProvider then the code works just fine. I have created a topic to use for this test. Is there something else that I need to do in order to create a custom provder?

      I am using JBoss 4.0.5GA, running on Linux with the 64bit JDK 1.5.0_9.

      Thanks,
      edward