Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

MessageDrivenBean Listener Interface

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Message Driven bean listener interface may define more than one message listener method. The resource adapter will determine which method will be invoked

So, In a typical development environment, The MDB has to define all the methods that are required by Message Listener interface (atleast provide empty implementation for an unwanted message listener method), and the resource adapter will decide on which method to choose?
 
Nandhini Sridharan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I certainly understand that the same question has been asked and replied in different way by Himai and some other person already.. in this thread https://coderanch.com/t/644912/java-EJB-SCBCD/certification/message-driven-bean-listener-interface

But my question context is little different, I certainly understand that there are many message listeners based on messaging types. If the message listener interface (Like MessageListener interface imposes one method onMessage()), has many methods (like in POJI), MDB has to implement all those methods and the resource adapter will pick up one thats needed?
 
Creator of Enthuware JWS+ V6
Posts: 3342
303
Android Eclipse IDE Chrome
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

MDB has to implement all those methods and the resource adapter will pick up one thats needed?


Yes. (the resource adapter will get that from the resource adapter's configuration: the activation specification, which is provided per message listener type.)
 
Nandhini Sridharan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Frits
 
CLUCK LIKE A CHICKEN! Now look at this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic