3 Replies Latest reply on Jun 9, 2008 11:43 AM by Len DiMaggio

    Syntax to reference a queue in Tibco EMS from an ESB Notifie

    Len DiMaggio Apprentice

       

      I'm trying to find the correct syntax to have an ESB notifier direct messages to a queue defined in Tibco EMS, but have not been successful yet.
      
      I'm defining the Tibco JMS provider and queue as such:
      
      --------------------
      <jms-provider name="TibcoEMS" jndi-URL="tcp://localhost:7222"
       jndi-context-factory="com.tibco.tibjms.naming.TibjmsInitialContextFactory"
       connection-factory="QueueConnectionFactory">
      
       <jms-bus busid="sendJmsQueMessageGW">
       <jms-message-filter dest-type="QUEUE"
       dest-name="QUICKSTART_NOTIFIER_QUETEST_GW" />
       </jms-bus>
      </jms-provider>
      --------------------
      
      And the queue is there in Tibco EMS:
      
      --------------------
      Type 'help' for commands help, 'exit' to exit:
      tcp://hostname.csb:7222> show queues
       Queue Name SNFGXIBCT Pre Rcvrs Msgs Size
       > --------- 5* 0 0 0.0 Kb
       $sys.admin +-------- 5* 0 0 0.0 Kb
       $sys.lookup --------- 5* 0 0 0.0 Kb
       $sys.undelivered +-------- 5* 0 0 0.0 Kb
      * $TMP$.EMS-SERVER.11364848984C11.1 --------- 5 1 0 0.0 Kb
       queue.sample --------- 5* 0 0 0.0 Kb
       QUICKSTART_NOTIFIER_QUETEST_GW --------- 5* 0 0 0.0 Kb
       sample --------- 5* 0 0 0.0 Kb
      --------------------
      
      But - when I try to notify that queue as such:
      
      --------------------
      <target class="NotifyQueues">
       <messageProp name="quetest" value="some test property" />
       <queue jndiName="QUICKSTART_NOTIFIER_QUETEST_GW">
       </queue>
      </target>
      --------------------
      
      I'm getting this exception:
      
      javax.jms.JMSException: There is no administratively defined topic with name:QUICKSTART_NOTIFIER_QUETEST_GW
      
      Question - What's the correct syntax for the queue reference in the notifier? Thanks!
      
      
      
      



        • 1. Re: Syntax to reference a queue in Tibco EMS from an ESB Not
          Len DiMaggio Apprentice

           

          
          Tried adding the jndi-URL property to the queue reference:
          
           <target class="NotifyQueues">
           <messageProp name="quetest" value="some test property" />
           <queue jndiName="QUICKSTART_NOTIFIER_QUETEST_GW" jndi-URL="localhost:7222">
           </queue>
           </target>
          
          But - still no luck - seeing this exception now:
          
          14:17:19,281 ERROR [STDERR] java.lang.reflect.InvocationTargetException
          14:17:19,281 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          14:17:19,281 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          14:17:19,281 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          14:17:19,281 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
          14:17:19,281 ERROR [STDERR] at org.jboss.soa.esb.notification.NotificationTarget.fromParams(NotificationTarget.java:144)
          14:17:19,281 ERROR [STDERR] at org.jboss.soa.esb.notification.NotificationList.notifyAll(NotificationList.java:162)
          14:17:19,281 ERROR [STDERR] at org.jboss.soa.esb.actions.Notifier.notifyOK(Notifier.java:93)
          14:17:19,282 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          14:17:19,282 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          14:17:19,282 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          14:17:19,282 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
          14:17:19,282 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processSuccess(ActionProcessorMethodInfo.java:165)
          14:17:19,282 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.processSuccess(OverriddenActionLifecycleProcessor.java:108)
          14:17:19,282 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.notifySuccess(ActionProcessingPipeline.java:610)
          14:17:19,282 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:384)
          14:17:19,282 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
          14:17:19,282 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
          14:17:19,282 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
          14:17:19,282 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
          14:17:19,282 ERROR [STDERR] Caused by: org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException: Unexpected exception accessing Naming Context
          14:17:19,282 ERROR [STDERR] at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.getSession(JmsConnectionPool.java:165)
          14:17:19,282 ERROR [STDERR] at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.getSession(JmsConnectionPool.java:229)
          14:17:19,282 ERROR [STDERR] at org.jboss.soa.esb.notification.NotifyJMS.setUpProducers(NotifyJMS.java:403)
          14:17:19,282 ERROR [STDERR] at org.jboss.soa.esb.notification.NotifyQueues.<init>(NotifyQueues.java:71)
          14:17:19,282 ERROR [STDERR] ... 19 more
          14:17:19,283 ERROR [STDERR] Caused by: org.jboss.soa.esb.helpers.NamingContextException: Failed to create Naming Context
          14:17:19,283 ERROR [STDERR] at org.jboss.soa.esb.helpers.NamingContextPool.createContext(NamingContextPool.java:358)
          14:17:19,283 ERROR [STDERR] at org.jboss.soa.esb.helpers.NamingContextPool.getContext(NamingContextPool.java:296)
          14:17:19,283 ERROR [STDERR] at org.jboss.soa.esb.helpers.NamingContextPool.getContext(NamingContextPool.java:151)
          14:17:19,283 ERROR [STDERR] at org.jboss.soa.esb.helpers.NamingContextPool.getNamingContext(NamingContextPool.java:402)
          14:17:19,283 ERROR [STDERR] at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.initConnection(JmsConnectionPool.java:408)
          14:17:19,283 ERROR [STDERR] at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.getSession(JmsConnectionPool.java:163)
          14:17:19,283 ERROR [STDERR] ... 22 more
          14:17:19,283 ERROR [STDERR] Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:7222 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server localhost:7222 [Root exception is java.io.StreamCorruptedException: invalid stream header]]
          14:17:19,289 ERROR [STDERR] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
          14:17:19,289 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
          14:17:19,289 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
          14:17:19,289 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
          14:17:19,289 ERROR [STDERR] at org.jboss.soa.esb.helpers.NamingContextPool.createContext(NamingContextPool.java:342)
          14:17:19,289 ERROR [STDERR] ... 27 more
          14:17:19,289 ERROR [STDERR] Caused by: javax.naming.CommunicationException: Failed to retrieve stub from server localhost:7222 [Root exception is java.io.StreamCorruptedException: invalid stream header]
          14:17:19,289 ERROR [STDERR] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:268)
          14:17:19,289 ERROR [STDERR] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
          14:17:19,289 ERROR [STDERR] ... 31 more
          14:17:19,289 ERROR [STDERR] Caused by: java.io.StreamCorruptedException: invalid stream header
          14:17:19,290 ERROR [STDERR] at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)
          14:17:19,290 ERROR [STDERR] at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
          14:17:19,290 ERROR [STDERR] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:255)
          14:17:19,290 ERROR [STDERR] ... 32 more
          14:17:19,298 ERROR [NotificationList] Can't instantiate target <target class="NotifyQueues">
           <messageProp name="quetest" value="some test property"/>
           <queue jndi-URL="localhost:7222" jndiName="QUICKSTART_NOTIFIER_QUETEST_GW">
           </queue>
           </target>
          org.jboss.soa.esb.ConfigurationException: NotifyQueues does not extend NotificationTarget
           at org.jboss.soa.esb.notification.NotificationTarget.fromParams(NotificationTarget.java:151)
           at org.jboss.soa.esb.notification.NotificationList.notifyAll(NotificationList.java:162)
           at org.jboss.soa.esb.actions.Notifier.notifyOK(Notifier.java:93)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processSuccess(ActionProcessorMethodInfo.java:165)
           at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.processSuccess(OverriddenActionLifecycleProcessor.java:108)
           at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.notifySuccess(ActionProcessingPipeline.java:610)
           at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:384)
           at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
           at java.lang.Thread.run(Thread.java:595)
          


          • 2. Re: Syntax to reference a queue in Tibco EMS from an ESB Not
            Jiri Pechanec Apprentice

            Hi,

            you are on the right path. You just need to add also other attributes that are supported by JMSEpr.

            So the final version should look like this

            <target class="NotifyQueues">
             <messageProp name="quetest" value="some test property" />
             <queue
             jndiName="QUICKSTART_NOTIFIER_QUETEST_GW"
             jndi-URL="localhost:7222"
             jndi-context-factory="com.tibco.tibjms.naming.TibjmsInitialContextFactory"
             connection-factory="QueueConnectionFactory">
             </queue>
            </target>
            


            • 3. Re: Syntax to reference a queue in Tibco EMS from an ESB Not
              Len DiMaggio Apprentice

              Many thanks - that was it...

              show queues
               Queue Name SNFGXIBCT Pre Rcvrs Msgs Size
               > --------- 5* 0 0 0.0 Kb
               $sys.admin +-------- 5* 0 0 0.0 Kb
               $sys.lookup --------- 5* 0 0 0.0 Kb
               $sys.undelivered +-------- 5* 0 0 0.0 Kb
              * $TMP$.EMS-SERVER.1854484D4155F.1 --------- 5 1 0 0.0 Kb
               QUICKSTART_NOTIFIER_QUETEST_GW --------- 5* 0 4 1.0 Kb
               sample --------- 5* 0 0 0.0 Kb