aspose file tools*
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "In MDB Watch "In MDB New topic

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-
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
Consider Paul's rocket mass heater.
subject: In MDB's
Similar Threads
email handling??
MDB in WebSphere 4.0
Single-Threaded MDB?
High volume data processing question
calling SLSB from MDB