Saturday 24 December 2011

ejbPostCreate Method

For each ejbCreate method, you must write an ejbPostCreate method in the entity bean class. The EJB container invokes ejbPostCreate immediately after it calls ejbCreate. Unlike theejbCreate method, the ejbPostCreate method can invoke the getPrimaryKey and getEJBObject methods of the EntityContext interface. For more information on the getEJBObjectmethod. Often, your ejbPostCreate methods will be empty.
The signature of an ejbPostCreate method must meet the following requirements:
  • The number and types of arguments must match a corresponding ejbCreate method.
  • The access control modifier must be public.
  • The method modifier cannot be final or static.
  • The return type must be void.
The throws clause may include the javax.ejb.CreateException and exceptions that are specific to your application.

No comments:

Post a Comment