Hello, im building a functionality where a person connects to the server, sends a request. the server then starts some business logic which produces jms messages for him. The user then connects to the sockect and receives that information through a stream from a message listener with a selector.
The socket part is implemented as fllows:
User ----[socket]----> Service Mbean ----[local]----> Stateless Session Bean ----[delegate]----> POJO -----[create]----> JMS Message Listener
My problem is - i cant find a satisfying way to dynamically create and destroy message listeners...
Tried creating message consumers with jmstemplate, but i get no messages :/
jmsTemplate.execute(new SessionCallback() { public Object doInJms(Session session) throws JMSException { MessageConsumer mc = session.createConsumer( incomingQueue, "id='" + id + "'" ); mc.setMessageListener(node); return null; }