Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 54771 invoked from network); 24 Jan 2008 16:47:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2008 16:47:03 -0000 Received: (qmail 65192 invoked by uid 500); 24 Jan 2008 16:46:51 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 65179 invoked by uid 500); 24 Jan 2008 16:46:51 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 65168 invoked by uid 99); 24 Jan 2008 16:46:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2008 08:46:51 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jeffgbutler@gmail.com designates 209.85.146.182 as permitted sender) Received: from [209.85.146.182] (HELO wa-out-1112.google.com) (209.85.146.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2008 16:46:24 +0000 Received: by wa-out-1112.google.com with SMTP id j5so469914wah.24 for ; Thu, 24 Jan 2008 08:46:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=0fdMPSSUqDAWvWlXWYc3l80N9HvV0T5LpEc9l0/qW1Q=; b=mUx2dXgkwbiyyzSQxw/vQu8WJNGcH3+Pa9Re9sowOtE6JA187mthJYvrMulzlHBkJ4Dx2czE5POcwvrvfc8PWVCe9gvUIx0FwFKi+NklMGM4yyW8Vnmp8GjrMaOvbD8X3YkbPb4fsiiQmMKlG7MQV56uusL68qtnHDUaJKP5wtM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=FW1tExCr2CAOpI6/6QoaeWG9fXmGsGYGhZyr60LrlYwn+ukeWvvGBQsjdyiMGSTvw2N0y8VL50CTtGuvq7cNhKMkqsdShexkSLD9YmRcfHwgsBcj8eV5szdTpGBj1IePUBOOuDeLHGYxIng9bxP+SFeq3/RvNDIBL0U5D50wiCw= Received: by 10.115.49.16 with SMTP id b16mr1005069wak.65.1201193190613; Thu, 24 Jan 2008 08:46:30 -0800 (PST) Received: by 10.114.74.9 with HTTP; Thu, 24 Jan 2008 08:46:30 -0800 (PST) Message-ID: Date: Thu, 24 Jan 2008 10:46:30 -0600 From: "Jeff Butler" To: user-java@ibatis.apache.org Subject: Re: How get DB2Connection object from SqlMapClient? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_37098_24210401.1201193190600" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_37098_24210401.1201193190600 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 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! > ------=_Part_37098_24210401.1201193190600 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
This comes up a lot!  I just added a WIKI page describing the process:
 
 
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!


------=_Part_37098_24210401.1201193190600--