Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ebjCreate for MDB

 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Jack
 
Todor Mollov
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A message-driven bean class can define one = true
OR
more ejbCreate methods = false
true || false = true
The answer is true.
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic