Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a question from whizlabs simulator

 
Bob Walker Jr
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is one question for the "special" version of Whizlabs simulator that they are giving for free.
Given the following code for the home interface of a stateful session bean, which of the following statements are true? (BTW, you can't even copy-paste from the damned thing. I have to type it to post it here.)

Correct options are:
C. MyBean is the remote component interface.
E. The code will be valid only if create and createBean methods throw RemoteException.
My problem: What's up with the createBean method? Can you even have such a method in the home interface of a session bean?
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
1) This method can only be in home interface of STATEFUL Session Bean (stateless session bean can only have create() without arguments). Usually customized "create" methods are used to setup/initialize state of stateFUL session beans.
2) Every method of *REMOTE* home interface has to declare *RemoteException* in method signature. They work over NETWORK.
 
Bob Walker Jr
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your explanation, Mikalai.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic