Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Best moment to load configuration parameters?

1 view
Skip to first unread message

r11...@open-consult.com

unread,
Aug 21, 2007, 8:36:27 PM8/21/07
to
Hi,

I'm new to J2EE and had developed an small app which uses JBoss 4.x
and stateless session beans (no entity beans for now).

For this app I stored the configuration info (such as SMTP hostname,
Webservices url, etc) in a properties file which I read and store in a
Configuration (singleton) class for the rest of the application to
access.

Currently, the reading portion of the properties file is done when one
of the properties of the Configuration class it access for the first
time. This works just fine, however, I don't like it (and believe it
has to be a better way) and would like to hear some advice on how to
load this configuration info when the application is deployed or the
server restarted, with no need of accessing the class properties to
trigger the actual reading of the file.

Thanks in advance,
JPenn

0 new messages