I do the same myself. This way my data access code is not dependant on
the HTTP layer. 


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/

(And, for the record, Actions are not servlets ;-) Struts uses one
controller ActionServlet. The Actions are plain classes with access to
the single controller servlet.)

[EMAIL PROTECTED] wrote:
> 
> Hi, I'm curious if folks avoid using Connection objects directly in Action
> servlets.  My action servlets obtain a Connection from a static utility
> method and pass this Connection into the methods of my database classes.
> I'm wondering if there is any significant advantage to removing the
> Connections from the Action servlet and having the database methods get
> Connections themselves.  It would basically remove 1 line of code from my
> action servlet - getDBConn().  Anyone have strong arguments either way?

Reply via email to