These are some questions for the EJB interviews. Although you may have a good knowledge of EJB, you must revise the topics through answering questions. As EJB interviews are tough because the interviewers try to find the most talented developers in this field. So, to help you, we share some important questions that may help you in your interviews.
Timer service is a method to construct a scheduled program. @Timeout is used in EJB 3.0 to maintain the EJB services in the beams such as stateless session beam and Message Driven beam too. Example of timer service is the generation of salary slips on any particular date of the month.
Creation of stateless EJB is done in simple steps:
EJB stands for Enterprise java bean is a server-side software that is used to construct the module of enterprise software. It works on the container or we can say application server to scattered and business level application. Container plays a supporting function to transaction management and security that helps the developers and users to work on it easily. It is simple for them to concentrate on business logic.
The query language is used to provide the navigation with the help of network and consists beans. Container-managed persistence determined the enterprise beans. EJB QL emerged in EJB 2.0. It is motile through the persistence manager that helps to determine methods of the finder. It helps the two kinds of the finder system. EJB QL is not good than SQL as it works as an abstract schema.
Here is the list of callback annotation for an entity bean:
On Occurrence of Application exception: EJB return the exception to client as it is intercepted. The method EJBContext().setRollBackOnly() specify that whether the transaction it should be rolled or not.
On Occurrence of System Exception: Here EJB first intercepts the transaction, rollback it and then initiate the clean-up tasks. It converts the exception into RemoteException before sending to the client.
Entity beam is divided into two types: -
It is not possible to have threading in EJB because Container maintains and controls the processing in EJB. And if threading is allowed in this, the container will be affected. As it is discussed earlier, EJB is designed to Lower the work on the developer and make them easier to just focus on business logic. EJB is not built to control the system or implementation works so container itself manage the thread.
The various types of EJB are: -
Never Miss an Articles from us.