ejbLoad and ejbStore are called to synchronize the bean's state with the db,
So they can be called any time and not necessarily after ejbActivate and before ejbPassivate respectively.
The spec says
When an entity bean instance is in the ready state, the instance is associated with a specific entity object identity. While the instance is in the ready state, the container can synchronize the state of the instance with the state of the entity in the underlying data source whenever it determines the need to, in the process invoking the ejbLoad and ejbStore methods zero or more times. A business method can be invoked on the instance zero or more times. The ejb- Timeout method can be invoked on the instance zero or more times. Invocations of the ejb- Load and ejbStore methods can be arbitrarily mixed with invocations of business methods and ejbTimeout method invocations. An ejbSelect<METHOD> method can be called by a business method (or ejbLoad or ejbStore method or ejbTimeout method ) while the instance is in the ready state.
posted 13 years ago
Got it!!! Tks Amol !!! ;-)
SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
They weren't very bright, but they were very, very big. Ad contrast: