Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

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: 3678
38
  • 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.
 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic