dcsimg
How do i write listener class
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   PRADEEP_jon
Posted On:   Tuesday, October 1, 2002 08:18 PM

Re: How do i write listener class

Posted By:   rajeev_kumar  
Posted On:   Thursday, October 3, 2002 06:23 AM

You have write Message Driven Bean for this, find the details on java.sun.com

Design would be as follows, as soon as the message is posted on Topic/Queue, as Message Driven Bean is registered with Topic/Queue, it will trigger off the Message Driven Bean onMessage() method, in which u can do all the business processing logic or something else u want to do,
Hope this Helps

Re: How do i write listener class

Posted By:   rajeev_kumar  
Posted On:   Thursday, October 3, 2002 06:23 AM

You have write Message Driven Bean for this, find the details on java.sun.com

Design would be as follows, as soon as the message is posted on Topic/Queue, as Message Driven Bean is registered with Topic/Queue, it will trigger off the Message Driven Bean onMessage() method, in which u can do all the business processing logic or something else u want to do,
Hope this Helps

Re: How do i write listener class

Posted By:   Anonymous  
Posted On:   Wednesday, October 2, 2002 01:54 AM

The reciever has to be registered to JMS. If a message arrives the JMS implementation (e.g. your Application Server) invokes the call-back-method "onMessage()". The message is passed as parameter.

public void onMessage(Message message) {
if (message instanceof TextMessage) {
TextMessage textMessage = (TextMessage) message;
// parse the XML string
}
}
About | Sitemap | Contact