Highlighted

LCDS and JMS ObjectMessage

Avatar

Guest

21-07-2008

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:<br /><br />bJava Code Putting Message on ActiveMQ<br />ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory("tcp://localhost:61616");<br />Connection conn = fac.createConnection();<br />conn.start();<br /> <br />Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);<br />Destination dest = sess.createTopic("messageTopic");<br /> <br />MessageProducer producer = sess.createProducer(dest);<br />com.foo.Person person = new com.foo.Person("John Doe");<br />ObjectMessage msg = sess.createObjectMessage(person);<br />producer.send(msg);<br /><br />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.<br /><br />bFlex Client Receiving Message from LCDS<br /><mx:Consumer id="jmsConsumer" <br /> destination="feed"<br /> message="jms_MessageHandler(event)" <br /> fault="jms_FaultHandler(event)"<br />/><br /><br />private function jms_MessageHandler(event : MessageEvent) : void {<br /> Alert.show("BODY: " + event.body);<br />}<br /><br />Any ideas why I can't get the object in Flex??

Replies

Highlighted

Avatar

Guest

05-02-2009

I am developing an application and I am in a position where I can push messages to one or many AIR applications and the selection of AIR application will be decided by LCDS server. Here I am making use of JMS along with JMS adapter. I need a way to receive an acknowledgement to LCDS server when the message is delivered.

I have found few application where JMS subscriber is sending acknowledgement to JMS producer, but I need a way where JMS producer is getting acknowledgement from each Flex client.