on 05-22-2006 12:39 PM
Hi,
I would like to know the simplest approach for connection to and reading data from an external message queue inside WAS. Have you guys any information to share on this?
Regards,
Christian
Thanks!
According to the link above I think i know the logic needed to connect and read from a queue. Now a last question from a quy who doesn't come from the J2EE world...
How would you typically initiate the reading of the message queue (or the registration of a MessageListener)?
- I just need a mechanizm to automatically start a "thread" which continiously can read messages from the queue - would you need to deploy a EJB for this purpose or is there a simpler way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Christian,
Usually it's not recommended to start threads from within J2EE applications. Since in that you interfere with the server management resources. It's forbidden by the EJB specification to do so from a bean in the EJB container.
The recommended way to receive messages is via MDB - whenever your application is started it will start receiving messages from your destination and the server will start invoking your onMessage() method.
Just have a look at any MDB/JMS tutorial.
The "not recommended" way is to start a new thread and to poll there from your destination by using synchronous JMS message listeners (like for example a call to receiver.receiveNoWait()) or by registering your own implementation of asynchronous MessageListeners (that by the way is very close to the MDB idea, however you will not be able to benefit from the built-in MDB scaling, performance benefits, transaction and security handling that can be easily tuned with your deployment descriptors even after the application has been created)
HTH
Peter
Thanks Guys!
It's a SonicMQ message queue which we need to read messages from.
/ C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you familiar with http://www.sonicsoftware.com/products/sonicmq/documentation/index.ssp
SonicMQ® V7.0 Application Programming Guide (2.8 MB, pdf)
Takes you through the
Java
sample applications to describe the design patterns they offer for your applications. Details each facet of the client functionality: connections, sessions, transactions, producers and consumers, destinations, messaging models, message types and message elements. Complete information is included on hierarchical namespaces, recoverable file channels and distributed transactions.Hello Christian,
The SAP Web AS comes with a built-in JMS provider which is used by default. However the server also supports easily switching to another JMS provider - SonicMQ in your case. This is done by the service JMS connector.
Just have a look at :
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/cd/4d4941abbb4c0de10000000a1550b0/content.htm">integrating external JMS provider</a>
HTH
Peter
Which is this external Message queue? a lot of things depend upon the destination you are trying to connect to and hence the question. May be if you can specifically name a product like websphere mq , sonic mq or so??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Isn`t it good enough http://help.sap.com/saphelp_nw04/helpdata/en/4a/d33cc46d204ad4aeafcd43fc325044/frameset.htm ?
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.