Rickard,
Use ejbActivate instead of the constructor to set the id. Also, I just
answered Constantine about the same issue. Please refer to that answer for
more details.
Imre Kifor
Valto Systems
-----Original Message-----
From: Rickard �berg <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, March 17, 1999 10:29 AM
Subject: Re: ejbCreate( ) - initialize instance variables
>Hey
>
>Imre Kifor wrote:
>> The spec states that all bean instances must be created using
newInstance()
>> on the bean's class. This means that there will be only one valid initial
>> state per bean class in a running server (and is created through the
bean's
>> default public constructor).
>
>Although I agree that this is a great feature it won't be able to handle
>this:
>
> public int id = nextId();
>
>... since the value will change for each newInstance() call. The
>technique will work for simple default values, but if the value is
>computed somehow, as above, you're in trouble. Right?
>
>/Rickard
>
>--
>Rickard �berg
>
>Computer Science student@LiTH
>@home: +46 13 177937
>Email: [EMAIL PROTECTED]
>Homepage: http://www-und.ida.liu.se/~ricob684
>
>===========================================================================
>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".
>
===========================================================================
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".