[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
.
- 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
]
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
, 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
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
]
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
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
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.
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
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
10 matches
Mail list logo