Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 16448 invoked from network); 25 Jan 2006 10:30:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Jan 2006 10:30:38 -0000 Received: (qmail 82644 invoked by uid 500); 25 Jan 2006 10:30:36 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 82612 invoked by uid 500); 25 Jan 2006 10:30:36 -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 82599 invoked by uid 99); 25 Jan 2006 10:30:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2006 02:30:36 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=HTML_MESSAGE,NO_REAL_NAME,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of stevenlou@gmail.com designates 64.233.162.198 as permitted sender) Received: from [64.233.162.198] (HELO zproxy.gmail.com) (64.233.162.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2006 02:30:34 -0800 Received: by zproxy.gmail.com with SMTP id x7so67379nzc for ; Wed, 25 Jan 2006 02:30:13 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=QjSXZsBprOjP9Xy49UgAs49drz+5PS9LXcdnQHJnbKwuGWyEcuzkUPJ0X2LQ932PzwumOSIuLkPJ5AQbzGbEuulALQhQNUFSABDg/elZ/iQNBwnVNaNs5qnJ47JvhUs11pvQfgK/a1sHETjjjX+rcmrwyIj95n372EOBsfyTGGk= Received: by 10.36.8.15 with SMTP id 15mr442350nzh; Wed, 25 Jan 2006 02:30:12 -0800 (PST) Received: by 10.36.141.1 with HTTP; Wed, 25 Jan 2006 02:30:12 -0800 (PST) Message-ID: <7dcc9ba80601250230h2156038fm5b0fdce6e07367a3@mail.gmail.com> Date: Wed, 25 Jan 2006 18:30:12 +0800 From: To: user-java@ibatis.apache.org, lmeadors@apache.org Subject: Problem about ibatis query result in JNDI and SIMPLE connection MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_33662_14537776.1138185012913" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_33662_14537776.1138185012913 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Dear Larry, Now I encountered one strange problem, we got different result in Jndi and JDBC"simple" connection, the code is following: sqlMap.startTransaction(); querylist=3DsqlMap.queryForList("PersonInfo.selectAll",role); System.out.println(querylist.size()); .............. sqlMap.commitTransaction(); For this query, there are records in database, but in JDBC"JNDI" connection= , it can't get any record, the "querylist.size()" always return 0. But in JDBC"simple" connection, it can return the correct records, what's wrong? I think they should return some records. Following are the congiguration in sql-map-config.xml JDBC-SIMPLE: JDBC-JNDI Look forward to receiving your reply ASAP. THanks so much for your warm-hearted help. Thanks and Best Regards Steven ------=_Part_33662_14537776.1138185012913 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Dear Larry,
 
Now I encountered one strange problem, we got different result in Jndi= and JDBC"simple" connection, the code is following:
      sqlMap.startTransaction();
&nbs= p;     querylist=3DsqlMap.queryForList("Perso= nInfo.selectAll",role);
      System.out.println(querylist.size(= ));
      ..............   &n= bsp; 
      sqlMap.commitTransaction(= );       
 
For this query, there are records in database, but in JDBC"JNDI&q= uot; connection, it can't get any record, the "querylist.size()" = always return 0.
But in JDBC"simple" connection, it can return the correct re= cords, what's wrong? I think they should return some records.
 
Following are the congiguration in sql-map-config.xml
 
JDBC-SIMPLE:
  <transactionManager type=3D"JDBC" >
 &n= bsp;  <dataSource type=3D"SIMPLE">
  &nbs= p;   <property name=3D"JDBC.Driver" value=3D"CO= M.ibm.db2.jdbc.app.DB2Driver"/>
   <property name= =3D" JDBC.ConnectionURL" value=3D"jdbc:db2:sbb"/>
 &nb= sp; <property name=3D"JDBC.Username" value=3D"db2admin&qu= ot;/>
      <property name=3D"JDBC.P= assword" value=3D"zaq12wsx"/>
    </dataSource>
 
JDBC-JNDI
 <transactionManager type=3D"JDBC" >
 &nb= sp;  <dataSource type=3D"JNDI">
   &= nbsp;  <property name=3D"DataSource" value=3D"jdbc/s= bb"/>
    </dataSource>
  </tran= sactionManager>
 
Look forward to receiving your reply ASAP.
 
THanks so much for your warm-hearted help.
 
Thanks and Best Regards
Steven
 
 
 
 
------=_Part_33662_14537776.1138185012913--