I see a problem here...
The EJB specification only allows static final constants or class variables.
Static variables cannot be set when the server "comes up", they are only
initialized when the class is first instantiated (some time later). And,
when the referencing EJB is discarded by the container to make room for
other transactions, the helper class will also be discarded (and the value
of the static variables lost).
Another problem with static variables is that when the referencing EJB is
instantiates the helper class on a second VM within an EJB cluster the
values in the second VM are completely unrelated to the first.
Use EJB entity beans to persist variables across multiple transactions and
VM's within an EJB cluster.
-----Original Message-----
From: Sanjay Nambiar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 01, 1999 10:07 PM
To: [EMAIL PROTECTED]
Subject: Helper Classes
Importance: High
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.
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.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.
Cheers
SANJAY
===========================================================================
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".