ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Qian" <daqiqi...@aol.com>
Subject Re: how to manually flush cache in daoManger?
Date Fri, 29 Sep 2006 17:04:51 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
<font face="Arial,sans-serif"><font size="2">Jeff,<br>
<br>
That's what exactly I planed to do. Thanks for prompt response. <br>
<br>
btw, I miss some features which are available in sqlMapClient but not
in daoManager!<br>
<br>
Tony<br>
<br>
<br>
<span type="cite">Jeff Butler wrote on 9/29/2006, 11:56 AM:</span>
</font></font>
<p><font face="Arial,sans-serif" size="2"></font></p>
<blockquote type="cite"  style="border-left: thin solid blue; padding-left: 10px; margin-left:
0pt;"><font  face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">I assume you mean that
you want to flush the cache from iBATIS DAOs.</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">&nbsp;</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">Two things I can think
of...</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">&nbsp;</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">1. Write a do-nothing
query, and add that query to the &lt;flushOnExecute&gt; settings of
your cache declaration.&nbsp; Then execute the query in a dao method.</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">&nbsp;</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">2. You could write a dao
method to do this:</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">&nbsp;</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">SqlMapClient client =
(SqlMapClient) getSqlMapExecuter();</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">client.flushDataCache();</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">&nbsp;</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">The second requires some
knowledge of iBATIS internals, but it should work.</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">&nbsp;</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">Jeff Butler</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2"><br>
  <br>
&nbsp;</font></div>
  <font face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2"><span class="gmail_quote">On
9/29/06, <b class="gmail_sendername">Tony Qian</b> &lt;<a  href="mailto:daqiqian2@aol.com">daqiqian2@aol.com</a>&gt;
wrote:</span>
  </font>
  <blockquote class="gmail_quote"  style="border-left: 1px solid rgb(204, 204, 204); margin:
0px 0px 0px 0.8ex; padding-left: 1ex;"><font  face="Arial,sans-serif" size="2"></font>
    <div><font size="2" face="Arial,sans-serif"><font  face="Arial,sans-serif">All,
<br>
    <br>
I'm using Abator generated code for iBATIS. Does anyone know how to
flush cache manually in a similar fashion as in sqlMapClient?<br>
    <br>
thanks,<br>
Tony<br>
    </font></font></div>
  </blockquote>
  </div>
  <font face="Arial,sans-serif" size="2"><br>
  </font></blockquote>
</body>
</html>


Mime
View raw message