• Post Reply Bookmark Topic Watch Topic
  • New Topic

JPilot,, Java ranch exam question ID: 1

 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following statements about Home methods in a bean class is incorrect for Container Managed Persistence.

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.


Correct answers: B.

Why is B correct, meaning why "The throws clause of the method may include the java.rmi.RemoteException" is incorrect? If the bean is a RFemote bean, the throws clause must include the RemoteException!

Miki
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will RemoteException be declared for any methods of a bean's local home interface?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!