You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Ron Grabowski (JIRA)" <ib...@incubator.apache.org> on 2005/07/11 20:57:10 UTC
[jira] Commented: (IBATISNET-91) Cache is not flushed if the statement attribute of the flushOnExecute node is set to a or
[ 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"/>
</cacheModel>
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">
PerformDailyDatabaseMaintenance
</statement>
The following calls are made in GeneralStatement.java:
executeQueryForObject ->
executeQueryWithCallback ->
notifyListeners ->
onExecuteStatement ->
flush
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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira