• 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
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

Home methods in a bean class

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A free mock exam question as below:
Which of the following statements about Home methods in a bean class is incorrect for Container Managed Persistence [choose 1]:
A: The method must not access relationships.
B. The throws clause of the method may include the java.rmi.RemoteException.
C. The method must not access the bean's persistence state.
D. The method cannot be declared static.
E. The throws clause may include any exceptions defined by your application.

The answer is B. Isnt the RemoteException is allowed to be thrown by home method?
Any help would be much appreciated.
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Julius,

I guess this choice 'B' is based on some assumptions. the question is saying home business methods so it has to be entity bean and already said it is a CMP.

and if you look at all the options, everything looks fine from a home business method point of view.

But here is important thing. if some entity beans are in relationships then those beans must be local to each other. So based on this, local home interfaces doesn't throw remote exception.


question should have given some more details like, the bean involves in a relationship or something that triggers that the bean has local home interface...


Hope this helps.

Thanks,

Ugender
[ October 13, 2006: Message edited by: Ugender Rekulampally ]
 
I didn't say it. I'm just telling you what this tiny ad said.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic