File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes ebjCreate for MDB 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 "ebjCreate for MDB" Watch "ebjCreate for MDB" New topic

ebjCreate for MDB

Jack Zhou
Ranch Hand

Joined: Dec 27, 2003
Posts: 93
Q. The statement is true or false: A message-driven bean class can define one or more ejbCreate methods
a) True
b) False
I choose True. Spec says that mdb has to define a ejbCreate method with no argument. But it does not say that one and exactly one is allowed. For a stateless session bean, its component interface has to define exactly one create method.
softSCBD's answer is False. I cannot find the evidence to support softSCBCD's claim. What's your opinon?

Thanks,<br />Jack Zhou<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS,SCEA
Todor Mollov
Ranch Hand

Joined: Jan 13, 2004
Posts: 30
A message-driven bean class can define one = true
more ejbCreate methods = false
true || false = true
The answer is true.
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1066
You need to define an ejbCreate() method with no parameters for an MDB.
If you define other ejbCreate() methods with different parameters,
they will not be called by the container for MDB or SLSB and hence there is no use for such methods.
From the exam point of view, U cannot have multiple ejbCreate() methods for MDB or SLSB.
[ February 23, 2004: Message edited by: Vish Kumar ]
I agree. Here's the link:
subject: ebjCreate for MDB
It's not a secret anymore!