ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ron Grabowski (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATISNET-91) Cache is not flushed if the statement attribute of the flushOnExecute node is set to a <statement> or <select> id
Date Mon, 11 Jul 2005 18:57:10 GMT
    [ http://issues.apache.org/jira/browse/IBATISNET-91?page=comments#action_12315509 ] 

Ron Grabowski commented on IBATISNET-91:

It seems odd that a <cacheModel>:

  <cacheModel id="UserCache" implementation="MEMORY">
   <property name="Type" value="Strong"/>
   <flushInterval hours="2"/>			
   <flushOnExecute statement="Insert"/> 
   <flushOnExecute statement="Delete"/> 
   <flushOnExecute statement="PerformDailyDatabaseMaintenance"/> 

has a "statement" attribute yet you cannot pass a valid <statement> id into it:

 <!-- WARNING: UserCache will not be flushed when this statement is called by QueryForObject
 <statement id="PerformDailyDatabaseMaintence" cacheModel="UserCache">

The following calls are made in GeneralStatement.java:

 executeQueryForObject -> 
 executeQueryWithCallback -> 
 notifyListeners ->
 onExecuteStatement -> 

The Javadoc comment for onExecuteStatement says:

 ExecuteListener event.  This will be called by a MappedStatement
 for which this cache is registered as a ExecuteListener.  It will
 be called each time an executeXXXXXX method is called.  In the
 case of the Cache class, it is registered in order to flush the
 cache whenever a certain statement is executed.
 (i.e. the flushOnExecute cache policy)

Java people: does executing a <statement> flush the cache?

> Cache is not flushed if the statement attribute of the flushOnExecute node is set to
a <statement> or <select> id
> -----------------------------------------------------------------------------------------------------------------
>          Key: IBATISNET-91
>          URL: http://issues.apache.org/jira/browse/IBATISNET-91
>      Project: iBatis for .NET
>         Type: Bug
>     Reporter: Ron Grabowski
>     Assignee: Gilles Bayon
>     Priority: Trivial
>      Fix For: DataMapper 1.3

> The RaiseExecuteEvent() method is called at the end of ExecuteInsert and ExecuteUpdate
but not  at the end of ExecuteQueryForObject.
> Should it be called at the end of ExecuteQueryForMap and ExecuteQueryForList too ???

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message