• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when an application client1 sends messages to a message driven bean that is deployed in the server, how can another application client2 retrieve the messages sent to the message driven been deployed with the server.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ya...if u implement messagedriven beans...then these beans actually run on the server side and cant write to standard output..u will actually see the output in the server log file..
however one way to get arnd this problem is to create Message Listeners on the client side...instead of using MEssage driven beans,..this will do the task of message driven beans.ie. assynchronously listening to msg.. Check out this code snippet...

import javax.jms.*;
public class client implements MessageListener{

//any instance variables and methods that u like...
//its imperative to have this function
public void onMessage(Message msg){
if (msg instance of TextMessage)
System.out.println("Received text msg..");
}

likewise the msg can be printed to standard output..
be careful to note that when u deploy the application, the application client must be bound to the appropriate message Destination...these are done manually when u deploy the application.. if these settings are not present, then the client will have to way to listen to msgs...koz the message destination is not defined...
hope ive cleared out ur doubts!!!


:roll:
 
reply
    Bookmark Topic Watch Topic
  • New Topic