RE: Managing resource life cycle during request

2001-06-05 Thread Cook, Levi
[mailto:[EMAIL PROTECTED]] Sent: Monday, June 04, 2001 10:31 PM To: [EMAIL PROTECTED] Subject: Re: Managing resource life cycle during request I doubt that overriding ActionServlet.process() would work. The controller sends back the response, and it's done. It's then up to HTTP to deliver the view

Re: Managing resource life cycle during request

2001-06-05 Thread Jeff Trent
. - jeff - Original Message - From: Cook, Levi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 05, 2001 1:40 PM Subject: RE: Managing resource life cycle during request Can you elaborate on your resource cleanup requirements? My view on designing a responsible object

RE: Managing resource life cycle during request

2001-06-05 Thread Cook, Levi
] Subject: Re: Managing resource life cycle during request Levi, The view/JSP does not acquire the resource. Here is a sample of how the code use to work pre-struts: Servlet.doGet() { ... rs - dbquery request.setAttribute(rs, rs) requestDispatcher.include

Re: Managing resource life cycle during request

2001-06-05 Thread Jeff Trent
, June 05, 2001 2:05 PM To: [EMAIL PROTECTED] Subject: Re: Managing resource life cycle during request Levi, The view/JSP does not acquire the resource. Here is a sample of how the code use to work pre-struts: Servlet.doGet() { ... rs - dbquery

Managing resource life cycle during request

2001-06-04 Thread Jeff Trent
I was wondering how other people deal with physical resource objects (eg. db result sets, etc.) during a request. Before struts, I use to allocate the resource, call request.setAttribute() with the resource object, call request dispatcher (to do jsp presentation), then clean up the resource

Re: Managing resource life cycle during request

2001-06-04 Thread Jeff Trent
] To: [EMAIL PROTECTED] Sent: Monday, June 04, 2001 6:13 PM Subject: Re: Managing resource life cycle during request In general, you should put everything you need for the presentation into a JavaBean, release any other resources, and return just the bean in the request. This way you also do things

Re: Managing resource life cycle during request

2001-06-04 Thread Jeff Trent
check source code now for this answer... - jeff - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 04, 2001 9:25 PM Subject: Re: Managing resource life cycle during request The types of objects I use for presentation should be disposed

Re: Managing resource life cycle during request

2001-06-04 Thread Ted Husted
Following the rendering? By Struts? None. It's a straight JSP (or other view technology, like a Velocity template). Generally, things go into the request, and are disposed when the request is disposed. There's an enhancement to the iterate tag in the works that uses a RowSet directly.

Re: Managing resource life cycle during request

2001-06-04 Thread Jeff Trent
the rendering of the input page? I'll check source code now for this answer... - jeff - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 04, 2001 9:25 PM Subject: Re: Managing resource life cycle during request The types of objects I

Re: Managing resource life cycle during request

2001-06-04 Thread Ted Husted
I doubt that overriding ActionServlet.process() would work. The controller sends back the response, and it's done. It's then up to HTTP to deliver the view, usually a JSP. Any clean-up routine would have to be the responsibility of the view, which puts you into the scriplet zone. Jeff Trent