Re: Application context bean

2005-08-10 Thread Dave Newton
Craig McClanahan wrote: Besides being more deterministic in this scenario, one quickly gets hooked on the ability to get notified when *attributes* are changed in request/session/application scope, as well as lifecycle events -- without having to modify the classes of the attribute instances the

Re: Application context bean

2005-08-10 Thread Craig McClanahan
On 8/10/05, Dave Newton <[EMAIL PROTECTED]> wrote: > Frank W. Zammetti wrote: > > > Probably a better idea to be more deterministic and do it with a > > listener though, for the reasons Craig expertly described. > > I agree. > > Thanks guys--I'll definitely make the switch! > Besides being mor

Re: Application context bean

2005-08-10 Thread Dave Newton
Frank W. Zammetti wrote: Probably a better idea to be more deterministic and do it with a listener though, for the reasons Craig expertly described. I agree. Thanks guys--I'll definitely make the switch! Dave - To unsubsc

Re: Application context bean

2005-08-09 Thread Frank W. Zammetti
Craig beat me to it :) That's exactly what I was going to say. One point to make... if you do it with a servlet anyway and you read in your config and store it in a bean as static members, and one of the fields you set is a boolean configured field, and only populate the bean if its false, th

Re: Application context bean

2005-08-09 Thread Craig McClanahan
On 8/9/05, Dave Newton <[EMAIL PROTECTED]> wrote: > Frank W. Zammetti wrote: > > > P.S. - Someone else asked if a listener is better than a startup > > servlet of Struts plug-in... IMO, it's better than a plug-in because > > it's one less thing that is Struts-specific... Arguably it isn't any > >

Re: Application context bean

2005-08-09 Thread Dave Newton
Frank W. Zammetti wrote: P.S. - Someone else asked if a listener is better than a startup servlet of Struts plug-in... IMO, it's better than a plug-in because it's one less thing that is Struts-specific... Arguably it isn't any better than a startup servlet I suppose. I'm still using startup

Re: Application context bean

2005-08-09 Thread Frank W. Zammetti
You can save some time by using the AppConfigContextListener in Java Web Parts: http://javawebparts.sourceforge.net/javadocs/javawebparts/listener/AppConfigContextListener.html In it's simplest configuration it should take all of a few minutes to get it done, there are more advanced modes of o

Re: Application context bean

2005-08-09 Thread Michael Jouravlev
Search Struts mail archives for keywords: application, servlet, context, servletContext, global, storing. On 8/9/05, C.F. Scheidecker Antunes <[EMAIL PROTECTED]> wrote: > Hello all, > > I would like to have a bean with a data structure that gets populated > when the application starts and then th

Re: Application context bean

2005-08-09 Thread Joe Germuska
At 4:16 PM -0600 8/9/05, C.F. Scheidecker Antunes wrote: Hello all, I would like to have a bean with a data structure that gets populated when the application starts and then this bean is available to the entire application. The data structure will get populated via a data base. I need to cal

Re: Application context bean

2005-08-09 Thread Dave Newton
Wendy Smoak wrote: Use a ServletContextListener, which will be notified when the context starts and stops. Or that ;) As an aside, is there a good reason why this would be better than a startup servlet or plugin? Dave -

Re: Application context bean

2005-08-09 Thread Dave Newton
C.F. Scheidecker Antunes wrote: Hello all, I would like to have a bean with a data structure that gets populated when the application starts and then this bean is available to the entire application. The data structure will get populated via a data base. I need to call the database just once

Re: Application context bean

2005-08-09 Thread Wendy Smoak
From: "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]> I would like to have a bean with a data structure that gets populated when the application starts and then this bean is available to the entire application. Use a ServletContextListener, which will be notified when the context starts and s

Application context bean

2005-08-09 Thread C.F. Scheidecker Antunes
Hello all, I would like to have a bean with a data structure that gets populated when the application starts and then this bean is available to the entire application. The data structure will get populated via a data base. I need to call the database just once to populate the data structure.