What is ejbPostCreate() used for?
The usage of the ejbPostCreate() method has always been a point of confusion for many Enterprise JavaBeans (EJB) technology developers, but is very easy to explain. During initialization of an Entity Bean, the required ejbCreate() method of the bean is called and it's context is set. Finally the ejbPostCreate() method corresponding to the ejbCreate() method is called. During the call to ejbCreate() the bean knows nothing about itself or it's context. It is therefore unable to either pass a reference to itself, to another Entity bean, or even to access its own Primary key. In ejbPostCreate() the bean has access to its own remote interface and it's own Primary Key via the EntityContext and it's getEJBObject() and getPrimaryKey() methods. This is particularly useful for establishing relationships with other Entity Beans.
Move fast break things but with monitoring
-
We run a complex system with multiple services and every 2 or 3 week we
update the Java applications. I want to do it every week as most
applications are...
11 years ago

No comments:
Post a Comment