Which of the following regarding business methods in a bean class is incorrect?

Options
- Both session bean and entity bean business business methods are always same
- For Java RMI API, the argument and return types must always be legal types
- The throws clause may include any exceptions defined by your application.
- None of the above


CORRECT ANSWER : For Java RMI API, the argument and return types must always be legal types

Discussion Board
Business methods JAVA RMI API

It is always essential for business methods to use JAVA RMI API and the argument used in this with the return types should be legal types. Business methods needs to follow the certain rules and these are as follows:

1) The method name can't begin with ejb, this is to avoid conflicts with callback methods defined by the EJB architecture. Like, ejbCreate() or ejbActivate methods can't be called in the process.
2) It is essential for the access control modifier to be public so that it can be accessed from anywhere.
3) If the bean allows remote access through a remote business interface, the arguments and return types must be legal types for the Java Remote Method Invocation (RMI) API.
4) It is not essential or necessary for the modifier to be static or final.

Rohit Sharma 08-23-2014 02:44 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