• 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

Doubts in chapter-8 Message Driven Beans from HFEJB

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Folks

I have few doubts in Ch 8 ie MDB's
please kindly clarify them


1) in pg 447(from figure) MDB's container call backs are only ejbRemove() and setMessageDrivenContext(). so what about ejbCreate() is it not continer call back method. here it mentions it as only ejbLaw. where as in pg 445 it includes ejbCreate as one of the 3 container call backs.


2)MDB's dont accept checked or runtime exception. but on pg 446 it says at the very end in catch clause in onMessage() there is checked exception.
so is it allowed since it is from the getText() ?


3)pg 447 in the "sharpen the pencil" i just want to confirm if all the 3 options are compiler checked. i feel all of them are compiler checked. please let me know.

4) pg 467 from coffee cram results question 5 it says mdb's are able to access java:comp/env via JNDI from all the 3 methods ie ejbCreate(), ejbRemove(), setMessageDrivenContext(). so my doubt is why is it using it is it getting some kind of environment variable(system resources through JNDI). or is it getting some home interface referance( which i read from my previous chapters where jndi is used.) but mdb's dont use any of the home or remote interface. if that is the case.

5) pg 468 in Q) 8 container ensures there are no reentrants of bean instances. if it is the correct answer then y is the bean pool managed.
also option B says container is required to support transaction scoping what is this.


please kindly clarify them

thanks in advance

Priya Rao.
[ April 15, 2006: Message edited by: Priya Rao ]
 
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ans to Q3 - ejbCreate() is not compiler checked as ejbCreate doesn't come from any interface. onMessage comes from MessageListener interface AND ejbRemove and setMessageDrivenContext comes from MessageDrivenBean interface. Hence these three methods - onMessage, ejbRemove and setMessageDrivenContext are compiler checked.

Ans to Q5 - Refer to spec pages 325, 326.
 
I am mighty! And this is a mighty small ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic