ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: remapResults setting and force a reload of sqlmap at runtime
Date Wed, 30 Aug 2006 19:18:50 GMT
(1) Yes and (2) No. :-)

On 8/30/06, Scott Zhu <scottzhu@gmail.com> wrote:
>
> Thanks for the quick response. So you are saying we don't need the
> remapResults if just the table name is dynamic?
>
> As far as for the CDATA, since we need that in some other places (to escape
> the < >, etc.), we just use it consistently for the statement bodies
> (anywhere no ibatis keyword is used). That shouldn't hurt right?
>
>
>
> On 8/30/06, Larry Meadors <lmeadors@apache.org> wrote:
> > The remapResults attributes should only be required if the result
> > mapping (i.e., column list) changes.
> >
> > In the case you included, it should not be (nor should the CDATA section).
> >
> > Larry
> >
> >
> > On 8/30/06, Scott Zhu <scottzhu@gmail.com> wrote:
> > >
> > > 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