Choose the incorrect statement from the following about Home methods in a bean class for CMP (Container Managed Persistence).

Options
- The throws clause of the method may include the java.rmi.RemoteException.
- Relationships must not be accessed by the method
- The persistence state of the bean must not be accessed by the method
- The static declaration can not be done for the method.


CORRECT ANSWER : The throws clause of the method may include the java.rmi.RemoteException.

Discussion Board
CMP methods

CMP stands for container managed persistence as it allows multiple entity beans to have relationships among themselves. The container manages the relationships and the referential integrity of the relationships that it keeps between the methods. It is incorrect to say that the clause of the method includes java.rmi.RemoteException as it includes the exceptions that has been defined for the application. Any application is ready to throw an exception when there is a system level problem which has the inability to connect to the database for which the business method should throw a javax.ejb.EJBException. The container will not wrap any application exceptions that is a subclass of RuntimeException as it is not included in the throws clause of the business methods.

Rohit Sharma 08-25-2014 06:59 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement