Hi,

I see three options:
 a) make the config-bean a singleton: easy to access from everywhere in the JVM
 b) put the config-bean into the servlet-context: makes it easy to access it
    within the webapp, but somehow you need access to request or servlet-context
 c) create a lookup-bean (JVM-singleton) and have this bean provide access
    to the config-bean: usefull if you have more than one bean. Eg. we use it
    to give our apps access to some helper-classes. Always the same 
    mechanism to access whatever helper-class one needs...
hope this helps
Alexander 

-----Original Message-----
From: Phase Web and Multimedia [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 30. April 2002 19:51
To: Struts User List
Subject: Best Practice Question.


I have a bean that is created when my app starts and it contains some
database table conifguration info (I'll call it my config bean). Later on in
an Action class another bean, that I'll call my logic bean, needs to access
the values of the config bean. Would it be proper to use the Action class to
pass the config bean to the logic bean and let the logic bean extract the
values or should I extract all the values from the config bean within the
Action class and pass the config info in a different manner.

Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to