• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

can Session beans allow us to send JMS messages

 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1)can Session beans allow us to send JMS messages ?
2)If yes ,How?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Samanthi perera wrote:1)can Session beans allow us to send JMS messages ?


Yes, you can send JMS messages from within session beans.

Samanthi perera wrote:
2)If yes ,How?



The same way as you do from any other client code. Have you read the JMS tutorial?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but session beans doesn't have onMessage method?
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't need any onMessage method to *send* JMS messages. Please read the tutorial for more details.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok.
sessionbean send messages to Queue or topic.
then MDB listen to messages and when there is a message it take the message.
then who is the consumer?
is consumer MDB?
 
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

is consumer MDB?


A consumer is any class that implements the MessageListener and subscribes to the topic/queue.
An MDB is a MessageListener (implements the interface) and hence is a consumer.
An MDB is also an EnterpriseBean - so you can use Container supported transactions, object pooling features right out of the box as you would with any ejb.

ram.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is there any other thing it can be consumers other than MDbs?
 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As stated by Jai .

A consumer is any class that implements the MessageListener



Let me explain you more clearly ,Any class can be Consumer if it implements the MessageListener , and we normally go for MDB as the container takes care of all things like MDB instance creation and many other things .
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok.
1)client send messages to Queue.
2)MDB gets messages from Queue.

Is this the whole process?
But i read that MDB is a like a voice mail.It doesn't need to present both message sender and receiver.
anyway Isn't there any other process?
 
Squanch that. And squanch this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic