Hi fname -

> 1) The EJBObject is created after ejbCreate.
> 2) The instance is allowed to fully initialize itself
> in postCreate before the reference is presented to the
> client.
> 3) It's valid to pass a reference to the bean to
> another bean in postCreate.
> 4) All methods between ejbCreate and ejbStore are
> executing within a transaction (including postCreate).
>
> I realize that none of this explicitly states that
> it's OK to call a business method from postCreate.  On
> the other hand, I can't find anything that explicitly
> says not to call business methods from within
> postCreate.  If business methods are allowed from
> postCreate then it seems to follow that ejbLoad should
> not be called without the container first calling
> ejbStore (the behavior that I'm experiencing).

Calling business methods from ejbPostCreate is perfectly legal.

===
EJB2.0: Table 4 - Operations allowed in methods of an Entity Bean
ejbPostCreate DOES allow Enterprise Bean Access
===

But that does not imply that a loopback (re-entrant) call to the same bean
is legal while still in ejbPostCreate.

Doing so violates the life cycle diagram of the EB since it is not yet in
the READY state.

It seems to me:

a) The Container might have detected your scenario (that you were in still
ejbPostCreate) & could have done ejbStore/ejbLoad for you.
b) The Container might have done nothing. (After all, you marked the bean
"reentrant" so the onus was on you to handle loopbacks properly)
c) The Container might have rejected your attempt entirely since it violates
the EB life cycle.

You want (a). You got (b). You were fortunate not to get (c).

In short - Even if you manage to get this to work I doubt it is portable
across Containers.

Regrds
\Peter

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to