This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

MDB Sender

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This topic is a little out of the SCBCD.
But i have a question on a MDB!!
How can i send a message from a client to a J2EE Server that have a MDB with a specified onMessage method?

Thanks
Marco
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MDB can have only one onMessage method.
What do you mean specified?
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Every MDB type is associated with a particular Topic or Queue. When a client sends a JMS message, the server will allocate a correct MDB instance to service that request. In other words, an MDB is invisible to the client (which is why MDBs have no home or remote interfaces).
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MDB has no client view (no home/component interface), therefore client cannot call MDB directly. Instead, client send message to JMS and JMS will deliver the message to MDB.
[ January 30, 2006: Message edited by: Kengkaj Sathianpantarit ]
 
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A JMS Topic or a queue is configured as a resource on the server under a JNDI name. A client has to do a JNDI look up to get a reference to a particular Topic or Queue and then post the message
 
Marco Lombardo
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK ...
One question.
There is a EJB Server S1 that register a Queue with a name MX and
there is a EJB Server S2 that register a Queue with the same name.
If I look up with the JNDI name MX, what happen??
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you mean load balancing?
I think this depend on scheduler, it may get the referece from Server1 or Server2 up to the algorithm.
 
What does a metric clock look like? I bet it is nothing like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic