ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <steven...@gmail.com>
Subject Problem about ibatis query result in JNDI and SIMPLE connection
Date Wed, 25 Jan 2006 10:30:12 GMT
 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=sqlMap.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:
  <transactionManager type="JDBC" >
    <dataSource type="SIMPLE">
      <property name="JDBC.Driver" value="COM.ibm.db2.jdbc.app.DB2Driver"/>
   <property name="JDBC.ConnectionURL" value="jdbc:db2:sbb"/>
   <property name="JDBC.Username" value="db2admin"/>
      <property name="JDBC.Password" value="zaq12wsx"/>
    </dataSource>

JDBC-JNDI
 <transactionManager type="JDBC" >
    <dataSource type="JNDI">
      <property name="DataSource" value="jdbc/sbb"/>
    </dataSource>
  </transactionManager>

Look forward to receiving your reply ASAP.

THanks so much for your warm-hearted help.

Thanks and Best Regards
Steven

Mime
View raw message