JPilot,, Java ranch exam question ID: 17
posted 20 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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
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
posted 20 years ago
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.
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 ]
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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
Posts: 120
posted 20 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Thanks Sawan.
Miki
Miki
Miki<br /> <br />SCJP 1.4, SCBCD 1.3
| The longest recorded flight time of a chicken is 13 seconds. But that was done without this tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |






