• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

a question from whizlabs simulator

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 3903
43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for your explanation, Mikalai.
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic