On Fri, 6 Sep 2002, Craig Tataryn wrote:
> Date: Fri, 06 Sep 2002 17:57:42 -0500
> From: Craig Tataryn <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: Alternative Datsource Hot-potatoing...
>
> Thanks Ted, I'll check it out. But just out of curiosity, why would you
> ever want your Business Layer to know about Datasources?
>
> Craig.
This "Craig" stuff is going to get confusing :-).
The strategic issue, IMHO, is that you want business layer classes to know
the absolute minimum information possible to achieve its objectives. In
the particular case at hand, the minimum possible knowledge would be
what java.sql.Connection to use for their JDBC activities. If you're in a
batch-mode single threaded application, why would you want to go to all
the effort to establish a DataSource object, when you'd only ever use a
single Connection from it? If you're going to pass in a reference to a
JDBC-something object, it seems better to me that you pass a Connection
instead -- that way a batch app can pass the one-and-only Connection it
creates, and the business logic layer is none the wiser.
Craig (McClanahan :-)
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>