Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Producer and Consumer JMS Connections


Level 1

I am writing a JMS provider and I notice that Flex creates a
JMS connection for a Producer and another JMS connection for a
Consumer in my test application. Is this normal behavior for Flex
or do I have a problem with my provider that is causing this?


Chris Shafer, George Weiss Associates
0 Replies


Level 1
It'd be nice if it shared a connection 😉


Level 4
The JMS adapter that ships with the FDS/LCDS uses unique JMS
connections for consumers and producers. This is due to J2EE
restriction that states that JMS connections can have one active
JMS session. A JMS session can be used to receive messages or send
messages but not both. So there's no way, at least within J2EE, to
have JMS producer and consumer to share the connection.


Level 2
If your goal is to have one JMS Consumer which receives
messages and broadcasts them to Flex clients, you can do this
without using the JMS adapter. Write some Java code either as a
"message driven bean" or using the JMS apis directly to grab the
JMS messages. You can then convert these messages to flex messages
and send them to an ActionScriptAdapter flex messaging destination.
See the sample for the code necessary to do this. The
trickiest part of this is getting the JMS messages in the first
place. We are working on packaging up our JMS consumer apis so you
can do this more easily in a future release.