wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes setMessageDrivenContext() doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "setMessageDrivenContext() doubt" Watch "setMessageDrivenContext() doubt" New topic
Author

setMessageDrivenContext() doubt

Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
EJB Core Specification:
The setMessageDrivenContext method is called by the bean�s container to associate a message-
driven bean instance with its context maintained by the container. Typically a message-driven bean
instance retains its message-driven context as part of its state.

To test this functionality I had MDB that implements MessageDrivenBean interface.


setMessageDrivenContext() was never invoked and context remained null, which resulted in a NullPointerException in the onMessage().


SCJP, SCWCD, SCBCD
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Please take time to respond to this question.
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Experts/Ranchers, Please take time and reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setMessageDrivenContext() doubt