Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubts in chapter-8 Message Driven Beans from HFEJB

 
Priya Rao
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic