*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes JPilot,, Java ranch exam question ID: 17 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "JPilot,, Java ranch exam question ID: 17 " Watch "JPilot,, Java ranch exam question ID: 17 " New topic
Author

JPilot,, Java ranch exam question ID: 17

Miki Muzsi
Ranch Hand

Joined: Jun 23, 2003
Posts: 120
Which statements about stateful and stateless session beans are true?

A.Only stateful session beans support transactions.

B.Only stateful session beans can be passivated.

C.Only stateful session beans have a 'setSessionContext' method.

D.Both stateful and stateless session beans can support overloaded 'ejbCreate' methods.

E.Both stateful and stateless session beans can implement the 'javax.ejb.SessionSynchronization' interface.

F.Both stateful and stateless session beans can have instance variable state.

Correct answer B,F.

I think D is correct answer since even a stateless session bean can have overloaded ejbCreate() method, just thet the ones having arguments will nevcer be called.


Answer F is a bit tricky: it is true that both stateless and stateful SB can have instance variables. But what is the meaning of "instance variable state"? Since stateless session beans do not maintain state ...

Miki


Miki<br /> <br />SCJP 1.4, SCBCD 1.3
sawan parihar
Ranch Hand

Joined: Aug 24, 2004
Posts: 250
I think D is correct answer since even a stateless session bean can have overloaded ejbCreate() method


EJB specs page 87

The home interface of a stateless session bean must have one create method that takes no arguments. There can be no other create methods in the home interface. The session bean class must define a single ejbCreate
method that takes no arguments.



But what is the meaning of "instance variable state"?



The instance variable that you can deifine in your stateless session bean can hold some values. That is what instance variable state means.

Hope that helps.

Sawan
[ June 25, 2005: Message edited by: sawan parihar ]

Sawan<br />SCJP,SCWCD,SCBCD<br /> <br />Every exit is an entry somewhere.
Miki Muzsi
Ranch Hand

Joined: Jun 23, 2003
Posts: 120
Thanks Sawan.

Miki
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPilot,, Java ranch exam question ID: 17