wood burning stoves 2.0*
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "asynchronous jms consumer    " Watch "asynchronous jms consumer    " New topic
Author

asynchronous jms consumer

gionny deep
Greenhorn

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!!!
Regards
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10068
    
163

Have a look at:

QueueReceiver

MessageConsumer

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
Marshal

Joined: Jul 20, 2005
Posts: 10068
    
163

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: 8919

Use MessageListener for receiving asynchronous messages
http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageListener.html


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: asynchronous jms consumer