Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
EJB
« Previous
Next »
Which of the following can be directly invoked by the client?
Options
- ejbPassivate
- business methods
- setSessionContext
- newInstance
CORRECT ANSWER : business methods
Discussion Board
Business methods
Business Methods are invoked by clients on the object reference which it gets from dependency injection or JNDI lookup. The purpose of a session bean is to run business tasks or methods for the client. The business methods run locally as per the client's perspective but in reality they run remotely in the session bean. The business rule must adhere to the following rules:
1) No method name can begin with ejb this is to avoid conflicts with callback methods defined by the EJB architecture.
It is not allowed to call a business method like this: ejbCreate or ejbActivate.
2) The access control modifier must be public. The argument and return types must be legal for the JRMI API if bean allows any remote access through remote business interface.
3) The modifier must not be static or final. The throws method can include exceptions that can be defined by the application for example: remove method if something is not present then an Exception is thrown.
Rohit Sharma 08-19-2014 07:04 PM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲