ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hugh Ross" <hh4r...@gmail.com>
Subject Re: How get DB2Connection object from SqlMapClient?
Date Thu, 24 Jan 2008 17:56:08 GMT
Thanks, Jeff.  I'm not finding a getConnection method in the
ConnectionLogProxy class.  Is that because I'm using iBATIS 2.2.0?  If so,
is there another way to get the underlying Connection object?


On 1/24/08, Jeff Butler <jeffgbutler@gmail.com> wrote:
>
> This comes up a lot!  I just added a WIKI page describing the process:
>
>
> http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId=15597591
>
> Jeff Butler
>
>
>
> On Jan 24, 2008 10:03 AM, Hugh Ross <hh4ross@gmail.com> wrote:
>
> > Can anyone provide some sample code for this?
> >
> > I tried, but seemed to be blocked by $proxy objects or odd looking
> > com.ibm.db2.jcc.b.b objects...
> >
> > For example, this did not work for me:
> >
> >         java.sql.Connection conn = sqlMapClient.getCurrentConnection();
> >
> >         if (conn instanceof com.ibm.db2.jcc.DB2Connection )
> >         {
> >             com.ibm.db2.jcc.DB2Connection db2conn = (
> > com.ibm.db2.jcc.DB2Connection)conn;
> >             db2conn.setDB2ClientApplicationInformation
> > ("SomethingUsefulHere");
> >         }
> >
> > I also tried getting the DataSource 1st.
> >
> > Thanks!
> >
>
>

Mime
View raw message