Re: Lazy loading actions in Struts 2

2007-03-15 Thread Marco from Balboa
se au destinataire indiqué et peut contenir des >> > renseignements de caractère privé ou confidentiel. Si vous n'êtes pas >> le >> > destinataire de ce document, nous vous signalons qu'il est strictement >> > interdit de le diffuser, de le distribuer ou de le

Re: Lazy loading actions in Struts 2

2007-03-15 Thread Don Brown
le distribuer ou de le reproduire. > - Original Message - > From: "Marco from Balboa" <[EMAIL PROTECTED]> > To: > Sent: Thursday, March 15, 2007 9:28 AM > Subject: Re: Lazy loading actions in Struts 2 > > >> >> Spring generally requires that the

Re: Lazy loading actions in Struts 2

2007-03-15 Thread Marco from Balboa
s qu'il est strictement > interdit de le diffuser, de le distribuer ou de le reproduire. > - Original Message - > From: "Marco from Balboa" <[EMAIL PROTECTED]> > To: > Sent: Thursday, March 15, 2007 9:28 AM > Subject: Re: Lazy loading actions in Struts

Re: Lazy loading actions in Struts 2

2007-03-15 Thread Martin Gainty
- Original Message - From: "Marco from Balboa" <[EMAIL PROTECTED]> To: Sent: Thursday, March 15, 2007 9:28 AM Subject: Re: Lazy loading actions in Struts 2 > > Spring generally requires that the no-arg constructor be accessible. It ought > to be unless you explicit

Re: Lazy loading actions in Struts 2

2007-03-15 Thread Dave Newton
--- Marco from Balboa wrote: > In my case, I have connections to multiple databases > and some other very expensive resources that I am > allowing Spring to create and inject into the action > objects. Do you need to define them (the actions) in the context file? For instance, I am (currently)

Re: Lazy loading actions in Struts 2

2007-03-15 Thread Marco from Balboa
Spring generally requires that the no-arg constructor be accessible. It ought to be unless you explicitly override it in your class and mark it private. The only time I care about the instantiation of beans at startup is during development, where a quick application restart is helpful. When I am w

Re: Lazy loading actions in Struts 2

2007-03-15 Thread Dave Newton
--- Marco from Balboa <[EMAIL PROTECTED]> wrote: > I tried following the documentation where they > instruct to place the name of the Spring bean in > class attribute for the action definition in the > struts.xml. I assume this is what you are doing as > well, correct? No :( I wasn't doing that,

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Marco from Balboa
Dave, When you say "I define it by name in applicationContext.xml", what do you mean? I tried following the documentation where they instruct to place the name of the Spring bean in class attribute for the action definition in the struts.xml. I assume this is what you are doing as well, correct? I

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Dave Newton
--- Marco from Balboa <[EMAIL PROTECTED]> wrote: > but I am also encountering that it is happening at > application startup too. If I put a debug stmt in an Action ctor I don't see it on startup, only on a request. I am running under Tomcat 5.5, also using Spring. Ah, if I define it by name in a

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Marco from Balboa
They are definitely instantiated on each request, but I am also encountering that it is happening at application startup too. Is the behavior that I am observing unusual or unexpected? How do I stop it? Thanks Marco Dave Newton-4 wrote: > > --- Marco from Balboa <[EMAIL PROTECTED]> wrote: >>

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Marco from Balboa
They are definitely instantiated on each request, but I am also encountering that it is happening at application startup too. Is the behavior that I am observing unusual or unexpected? How do I stop it? Thanks Marco Dave Newton-4 wrote: > > --- Marco from Balboa <[EMAIL PROTECTED]> wrote: >>

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Dave Newton
--- Marco from Balboa <[EMAIL PROTECTED]> wrote: > Is there a way to prevent Struts 2 from instatiating > all the actions defined in the action configuration > file whe loading the application? I didn't know it did; I thought they were instantiated per-request. d. __