ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Zhu" <scott...@gmail.com>
Subject remapResults setting and force a reload of sqlmap at runtime
Date Wed, 30 Aug 2006 14:32:13 GMT
In our application, we need to support dynamic table names, so our statement
would look something like this:

   <select id="getProductIndexByOfferId" *remapResults="true"*parameterClass="
java.util.Map" resultMap="productIndexResult">
      <![CDATA[
      select p.ProductID
      from *$UA_ProductIndex$* p
      where OfferID=#offerID#
      ]]>
   </select>

If I understand it correctly, the remapResults is needed if the selected
columns or table names can be different at statement execution time (in
order to regenerate the prepared statement). In our case though, once we
choose the table name, it will remain the same until we change the
configuration (happens rarely). Since there's a performance hit by using
this setting (remapResults), I wonder if it's possible for us not to set it.
Then when the configuration is changed, is there a way we can force a reload
of (all the) sqlmap statements on the fly (we don't have an option to bounce
the app server)? I guess if not, I can still throw away the sqlclient
instance and re-create it.

Thanks.

Mime
View raw message