File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes asynchronous jms consumer    Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "asynchronous jms consumer    " Watch "asynchronous jms consumer    " New topic

asynchronous jms consumer

gionny deep

Joined: Jun 29, 2006
Posts: 1
Hi all
I want to create an asynchronous jms consumer.
The problem is that i do not want create a message driven bean.
I have a session bean that dynamically read from data base the name of the queue listened.
So i wonder if exists a way for implementing a asynchronous jms consumer.
Please help!!!
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Have a look at:



Though the following example is from jboss articles, this is not specific to jboss, and can be used as a reference:

Example from JBoss

[My Blog] [JavaRanch Journal]
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

asynchronous jms consumer

Thought about your question once again. Do you mean to say, your consumer should act similar to MDB(which get invoked when the message arrives on queue). If yes, then the links that i provided in my previous post may not be useful, because, the QueueReceiver uses the receive method(which is a blocking, i.e. synchronous method) *waits* for a message to arrive on the queue.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

Use MessageListener for receiving asynchronous messages

I agree. Here's the link:
subject: asynchronous jms consumer
It's not a secret anymore!