ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Osbaldeston <richard.osbaldes...@wordmap.com>
Subject Re: Access to the underlying connection
Date Tue, 19 Apr 2005 15:20:09 GMT
I'd be losing out on the Transactions and the easier to use connections 
(iBatis automatically closes them for you). But mostly I'd be hardcoding 
a JNDI lookup. Unfortunately I'm writing an API and can't (don't want 
to) restrict the end-users configuration like that. They might write a 
webapp with it, but equally likely is a swing/command line application 
and they shouldn't have to install an additional JNDI container in that 

You're right in that losing the datasources, connection provision and 
tranactions means I dont gain much from IBatis DAO framework that I 
couldnt write myself with just a properties file and 
Class.newInstance(). Which is where I'm heading.

- Richard

Brice Ruth wrote:

>Not to redirect you, but I know there's been other threads on the
>mailing list or on the old SF.net forums relating to accessing the
>underlying connection from iBATIS (or providing iBATIS with a
>thread-local connection of your own).
>One question I have is simply this: what are you gaining by defining
>the connection in iBATIS v. using a connection that you access from
>JNDI? You're not using SqlMaps, right? I'm not very familiar with the
>DAO system in iBATIS, but it would seem to me that for your purposes,
>you may want to grab your own connection from JNDI, and then if you
>need to pass that along to iBATIS for any reason, do it from the
>top-down, instead of bottom-up.

View raw message