Hi,

If your server d'ont call ejbCreate (resp. ejbActivate), then it has a
bug!

/Francis

soft designer wrote:
>
> I ran into an interesting situation when I tried to
> initialize bean instance private members.  Everytime
> when a bean is created or activated I would like to
> reset the private members to some pre-defined values.
> Initializating them in the declaration statements should
> not be the right way to do it.  Thus, I have a method
> just for the initialization, and it is called within
> ejbCreate() and ejbActivate().  This is what I saw,
> maybe someone can tell me if this is a normal behavior
> or something that I missed.
>
> In the container-managed entity bean, there is a private
> member which is a vector.  In the initValues() method I
> would set "Vector filters = new Vector()".  In the client
> I would get the bean via the findByPrimaryKey().  When I
> ran the client I got a null pointer exception.  Then I
> looked at the log, it seems to be the bean went from
> ejbSetEntityContext() straight to ejbLoad().  Since
> initValues() was not called and filters was being used
> in ejbLoad(), that's why the exception was thrown.  Then
> I looked at the EJB 1.1 spec, it said that for an
> instance transits from a pooled state to a ready state
> is thru either the ejbCreate(), ejbPostCreate() or the
> ejbActivate() method.  Can someone explain why it is not
> doing it?  I am using WebLogic 5.1.
> Thanks in advance :)
>
> Dennis
>
> ------------------------------------------------------------
> --== Sent via Deja.com http://www.deja.com/ ==--
> Before you buy.
>
> ===========================================================================
> 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".

--
[EMAIL PROTECTED]

MATHEMA Software GmbH
N�gelsbachstra�e 25 b
91052 E r l a n g e n
D e u t s c h l a n d
Tel +49(0)9131/8903-0
Fax +49(0)9131/8903-55
http://www.mathema.de

===========================================================================
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