EXACTLY! :-D
I think Paul and I mis-communicated on the point of the iBATIS DAO earlier.
It is something very different from iBATIS SQL Maps.
One of the key principles of Object-Oriented programming is
encapsulation – the separation of an implementation and its public
interface. The DAO pattern
Larry Meadors wrote:
You can (and should) use the DAO pattern with Hibernate, too.
So true, plus a good DAO interface can decouple your database access
implementation and the rest of your app, so that you can switch from
hibernate to ibatis or plain jdbc or whatever without having to make
Whats about a thread local variable to store the connection instead of
as instance variable ?
On 8/24/05, Gareth Evans <[EMAIL PROTECTED]> wrote:
> Hi Paul,
>
> How about using a DBCP, that way the connections are always there, a getting
> a connection each time
> you need to do a unit of work b
Hi Paul,
How about using a DBCP, that way the connections are always there, a getting a connection each time
you need to do a unit of work becomes less of an overhead. With dbcp you can create your connection
by using an xml file usually named 'something.jocl', drop this into you classpath an
You can (and should) use the DAO pattern with Hibernate, too.
The iBATIS DAO even has built-in support for hibernate (of course, it
has support for sql maps, too).
Larry
On 8/23/05, Paul Benedict <[EMAIL PROTECTED]> wrote:
> Erik,
>
> Oh, I have worked on a project where that was the
> pattern
Erik,
Oh, I have worked on a project where that was the
pattern I designed for myself!! One accepted a
connection for transactions, the other for
self-contained singleton executions. Yup, it's a great
pattern.
You raise an interesting point. I never thought about
using a middle-man between my bus
Original Message-
From: Paul Benedict <[EMAIL PROTECTED]>
Sent: Aug 23, 2005 6:35 PM
To: user@struts.apache.org
Subject: [OT] DAO Pattern in Struts
Guys,
This is off-topic but I need your help. There are some
good programmers here and I would like to receive some
advice back. I a
Have you looked at using something like the iBATIS DAO?
I think it could save you alot of pain.
One thing to watch out for is thread safety - putting a connection on
an instance (especially a shared instance) is pretty risky, especially
when you start thinking about transactions and the like...th
Guys,
This is off-topic but I need your help. There are some
good programmers here and I would like to receive some
advice back. I am sure there's a simple answer to it.
My Struts app is a multitier app (Web -> Business ->
DAO) and it uses Jakarta Commons DbUtils for the DAO
layer. My DAO methods
9 matches
Mail list logo