marc fleury wrote:
> 
> Toby I don't have the spec with me, can you check that the EJBObject is
> available from the ejbCreate method?  I seem to remember from the 1.1 days
> that it is only available with ejbPostCreate... so it is normal and spec
> compliant for you to have a null pointer in ejbCreate().

AFAICT, stateful session beans don't have ejbPostCreate(). Table 2 in
Section 6.6.1 (page 70 of ejb-2_0-pfd-spec.pdf) shows that getEJBObject
should be available in ejbCreate. This is also the case for stateless
session beans. I think you're right for entity beans.

Regards,

Toby.

> Please double check with2.0 and let us know
> 
> marc
> 
> |-----Original Message-----
> |From: [EMAIL PROTECTED]
> |[mailto:[EMAIL PROTECTED]]On Behalf Of Toby Allsopp
> |Sent: Monday, November 20, 2000 6:02 PM
> |To: [EMAIL PROTECTED]
> |Subject: [jBoss-User] getEJBObject in ejbCreate
> |
> |
> |Hello.
> |
> |I'm having a problem with SessionContext.getEJBObject() in the
> |ejbCreate() method of a stateful session bean. The problem is that the
> |id of the bean is null. The reason is that
> |StatefulSessionFilePersistenceManager assigns the id after calling
> |ejbCreate. It seems that a trivial fix is to move the
> |ctx.setId(nextId()) to before the createMethod.invoke(...).
> |
> |Or am I missing something and this would break everything horribly?
> |
> |Regards,
> |Toby.
> |
> |P.S. jBoss-2.0_FINAL (current CVS is the same)

-- 
Toby Allsopp
Research
Peace Software International Ltd
Ph +64-9-3730400


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to