We dump our references to the original SQLMapClient instance and
replace it with a new one (we don't allow anyone to reference it
directly in application code to make sure we don't have any leaks) but
we don't use Spring so I'm not sure how that might restrict your
options.

On Fri, Feb 22, 2008 at 10:19 PM, Larry Meadors <[EMAIL PROTECTED]> wrote:
> I haven't tried this myself, but there must be a way to reinitialize
>  the SqlMapClient - that would do it.
>
>  Larry
>
>
>
>
>  On Fri, Feb 22, 2008 at 3:03 AM, Davide Rogora
>  <[EMAIL PROTECTED]> wrote:
>  > Hi,
>  >  we have the following problem with iBatis.
>  >
>  >  Our application (web application using spring), in some cases does an
>  >  automatic upgrade of the database (add and drop colums on varous tables);
>  >  after this upgrade we have problems with iBatis, because iBatis by default
>  >  remembers what fields were returned the first time a query was run (so 
> i.e.
>  >  if we add a new column, the value of this new column is not returned by
>  >  iBabtis).
>  >
>  >  We've found two ways to solve this problem (but we don't like none of 
> them):
>  >  1) Restart the web application (but this solution is not applicable in our
>  >  case).
>  >  2) Set the remapResults attribute to "true" for each query (but it slows 
> the
>  >  application).
>  >
>  >  So, I'm asking you if there is a way, after our automatic db upgrade, to
>  >  tell iBatis to discard all the "cached" resultset metadata (so, the first
>  >  next time the query will be executed, iBatis will determine the correct
>  >  columns returned by the query).
>  >  Another solution could be to find a way to restart completely iBatis 
> engine
>  >  without restarting the web application.
>  >
>  >  Is there a way to achieve one of these two hypothetic solutions?
>  >
>  >  Thanks,
>  >  Davide.
>  >
>  >
>  >
>  >
>

Reply via email to