wood burning stoves*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes In MDB's 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 "In MDB Watch "In MDB New topic
Author

In MDB's

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
In MDB's do we have option to use either EJBContext or MessageDrivenContext ?


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
Ralph Jaus
Ranch Hand

Joined: Apr 27, 2008
Posts: 342
Not really: You can inject, for example, an EJBContext

@Resource private EJBContext ctx;

in a MDB (and use it - works fine). But

ctx instanceof(MessageDrivenContext)

will be true. That means even if you declare an EJBContext, the container will provide a reference to the sub-interface.


SCJP 5 (98%) - SCBCD 5 (98%)
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
thanks for your reply. I mean to say we can use any of them in MDB's
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: In MDB's