Sanjay Nambiar wrote:

> Hi,
>
> I would like to add question to the postings on helper classes.
>
> My application uses BMP  and additionally uses some common helper classes to
> execute the functionality required.
> The helper class methods are called from with the bean.I have a lot of
> static variables which are set when the server comes up and additionally
> quite a few other applications too are running on the same server.

There whas already a thread on this list handling static fields. The distributed
nature of ejb doesn't encourage the use of non-final static fields. Two
instances of the same bean component may live in differents VM.

>
>
> The question is :
> If I do not access these static variables for some time,would they get
> garbage collected by the garbage collector when such a time is reached.

Without  going through the hole class loading mechanism, let say your static
variables are never garbage collected. But a well architected application will
partition classes -through class loaders-, to enable unused classes -and static
variables- to be unloaded.

> The
> static data stored in these variables are very crucial to my application.In
> case the variables are not found my application could be in problems.

Your application will allway find that static variables, but remember it is not
a good pratice to use non-final static fields in ejb.

Regards.

Francis.

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