ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James, Steven" <steven.ja...@logicacmg.com>
Subject RE: Curious problem using iBatis 2.0 with MySql 5.0.19
Date Wed, 14 Jun 2006 07:55:22 GMT
Don't know if this will solve your issue but you do not call endTransaction in a finally block
in function getAllarmiAttivi. This should allways be there.. 

From: gianluca bertulu [mailto:gbertulu@yahoo.it]
Sent: Wed 14/06/2006 08:53
To: user-java@ibatis.apache.org
Subject: Curious problem using iBatis 2.0 with MySql 5.0.19

Hi all,
I'm using iBatis 2.0 with MySql 5.0.19 (with driver
I have this curious problem: when I perform a delete
(or update) and, after, I consecutively perform a
select (for example n times), for one of these times
(casually) the result is the old set of records that I
had before!
For example: I perform a select and the result is 3
records, I delete one of this: if I perform the same
select for n times, for one of these times the result
is 3 records and for the others times the result is
correctly 2 records !!
I don't use any cache model. I use this configuration
in other projects with Sybase and Sql Server without
any problems.
Here it is my code:
    <settings cacheModelsEnabled="false"
        lazyLoadingEnabled="true" maxRequests="32"
useStatementNamespaces="false" />
    <!-- Connect to Tomcat datasource -->
    <transactionManager type="JDBC">
      <dataSource type="JNDI">
        <property name="DataSource"


Implementation of Dao:
public class AllarmeSqlMapDao extends BaseSqlMapDao
implements AllarmeDao {
  public AllarmeSqlMapDao(DaoManager daoManager) {

  public List getAllarmiAttivi (){
    return queryForList("getAllarmiAttivi", null);

Method of Struts action:
 public List getAllarmiAttivi(Allarme allarme,
HttpServletRequest request,
response) {
    try {

      HashMap map = new HashMap();
      List  result = allarmeDao.getAllarmiAttivi();

    catch (Exception e) {

    return result;

Thanks in advance,
Gianluca Bertulu

Chiacchiera con i tuoi amici in tempo reale!

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any other party. If you are not
an intended recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.

View raw message