Which of the below are create method(s) for Entity bean?

Options
- Both b and d
- ejbCreate()
- ejbCreatePost()
- ejbPostCreate()


CORRECT ANSWER : Both b and d

Discussion Board
Entity bean

Creting Entity bean are similar to the process of creating session beans. The difference is in the method and data within the bean class. Two types of entity beans:

1) Bean-managed persistent and
2) Container-managed persistent.

The procedure describes the creation of entity bean:

1) Create a remote interface for the bean as it declares the method that a client can invoke. It extends javax.ejb.EJBObject.
2) Create a home interface for the bean. Extend javax.ejb.EJBHome which defines the create and finder methods, including findByPrimaryKey, for your bean.
3) Define the primary key (identifies each entity bean instance it can be a class like java.lang.String, or be defined within its own class) for bean.
4)The function used to create the entity bean is ejbCreate() and ejbCreatePostCreate().

Rohit Sharma 08-13-2014 01:24 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