> I need to confess I'm lost. The PetStore approach sounds cleaner in some
> sence, but also sounds too repetite in other, and mostly, sounds way to
> expensive (or it isn't?).

Struts uses a connection pool. So when you do a getConnection() you're
actually pulling one out from a pool of shared connection objects, so
there is no real problem with generating a new connection.

In my application I have manager objects will deal with data beans, and
these managers have methods that all look the same (open connection, select
data, build bean, close up, return). Yes it's a lot of cut and paste. I'd
prefer to have used EJBs but the project size doesn't warrant such expense
(time and effort, not money).

Reply via email to