This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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 REST with Spring (video course) this week in the Spring 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: 850
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: 850
thanks for your reply. I mean to say we can use any of them in MDB's
I agree. Here's the link:
subject: In MDB's
jQuery in Action, 3rd edition