I have a lot of informational beans that hold static reference data (think
ISO codes, State abbreviations, etc...) With these types of beans, I have
the choice of instantiating a singleton object reference to the bean and
accessing the methods through the object, or making all the methods
Title: RE: Bean Choices (code question)
there is no gc on static objects. static objects(methods,fields, or classes) are created once on startup and there is only one instance of the method or field ever created that all requestors to your class will use. But with Tomcat I do believe
, Charlie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 18, 2001 4:28 AM
Subject: RE: Bean Choices (code question)
there is no gc on static objects. static objects(methods,fields, or
classes)
are created once on startup and there is only one instance of the method
or
field ever created
Jeff Kilbride wrote:
Hi Charlie,
[...]
On the same subject, are class constructors called when static methods are
accessed? Right now, in my all static method classes, I'm doing my
initialization in static blocks. I'm wondering if I can move that
initialization into the class constructor,
Title: RE: Bean Choices (code question)
-Original Message-
From: Bo Xu [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001 1:47 PM
To: [EMAIL PROTECTED]
Subject: Re: Bean Choices (code question)
Jeff Kilbride wrote:
Hi Charlie,
[...]
On the same subject, are class
PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 18, 2001 11:21 AM
Subject: RE: Bean Choices (code question)
-Original Message-
From: Bo Xu [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001 1:47 PM
To: [EMAIL PROTECTED]
Subject: Re: Bean Choices (code question)
Jeff
I'm sorry if this is a little off-topic, since it is more about java code,
but I thought Tomcat users would be interested/knowledgeable about the way
beans work.
I have a lot of informational beans that hold static reference data (think
ISO codes, State abbreviations, etc...) With these types of
PROTECTED]
Subject: Bean Choices (code question)
I'm sorry if this is a little off-topic, since it is more about java code,
but I thought Tomcat users would be interested/knowledgeable about the way
beans work.
I have a lot of informational beans that hold static reference data (think
ISO codes
5:24 PM
Subject: RE: Bean Choices (code question)
If you make the bean class have a private constructor and a static
reference
to an instance of its own class, then there will always be a strong
reference from the class itself to the instance of the class. (The first
call to bean.getInstance