0 Replies Latest reply on Sep 7, 2007 10:41 AM by grosvenors

    connecting to remote JMS server

      I am running Flex2/FDS using Tomcat, and want to create a Producer/Consumer to message via a JMS application (Sonic ESB) on a different host. We have successfully done this with Flex 1.5 using a java servlet, but I cannot get it to work via Flex2/FDS messaging.

      Here are (I think) the essentials:

      We have the sonic jars on the server available to FDS, I also put them in tomcat's common/lib directory

      in mxml, I have:

      <Producer id="p" destination="sonicDestination" />

      in messaging-config.xml I have (relevant part):
      <destination id="sonicDestination" >
      <adapter ref="jms"/>
      <channel ref="my-rtmp">


      in web-xml I have:



      AND in context.xml I have:

      <Resource name="jms/connectionFactory" auth="container"
      username="_username_" password="_password_"
      defaultUser="_username_" defaultPassword="_password_"
      <Resource name="sonicDestination" auth="container"
      queueName="targetSonicQueue" />

      ... this all seems to deploy OK... in the mxml... when I create a message and try to have the producer send it...

      I get an error on the server (which is passed back as an exception to the client)... the relevant part of all that is:

      javax.naming.NamingException: Cannot create resource instance
      at org.apache.naming.factory.ResourceFactory.getObjectInstance()
      at javax.naming.spi.NamingManager.getObjectInstance()
      at org.apache.naming.NamingContext.lookup()
      _several layers of calling NamingContext_
      at javax.naming.InitialContext.lookup()
      at flex.messaging.services.messaging.adapters.JMSProxy.getDestination()
      at flex.messaging.services.messaging.adapters.JMSQueueProducer.start()

      It looks to me like it is finding Tomcat's JNDI service and getting to the point where its trying to instantiate the
      connectionFactory or the sonicDestination...
      and that's failing...

      do you have or know of someone who knows how to connect to from Flex 2.0.1 / FDS via Tomcat to a Sonic MQ (7.0) server on another host ?

      Thanx much