0 Replies Latest reply on Jul 21, 2008 7:42 AM by anoweb

    Flex, LCDS, JMS Object Message is null

    anoweb Level 1
      I am trying to get an object from ActiveMQ and push it to my Flex client with LCDS. I am using the JMS Adapter since the objects being put on ActivemQ are from Java. For example:

      Java Code Putting Message on ActiveMQ
      ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory("tcp://localhost:61616");
      Connection conn = fac.createConnection();

      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
      Destination dest = sess.createTopic("messageTopic");

      MessageProducer producer = sess.createProducer(dest);
      com.foo.Person person = new com.foo.Person("John Doe");
      ObjectMessage msg = sess.createObjectMessage(person);

      I have defined the object type in my "messaging-config.xml" as "javax.jms.ObjectMessage". However, when the Flex client gets the message the "body" is null.

      Flex Client Receiving Message from LCDS
      <mx:Consumer id="jmsConsumer" destination="feed" message="jms_MessageHandler(event)" fault="jms_FaultHandler(event)" />

      private function jms_MessageHandler(event : MessageEvent) : void {
      Alert.show("BODY: " + event.body);

      Any ideas why I can't get the object in Flex??