You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Tom Stroobants <To...@persgroep.be> on 2006/11/24 14:57:13 UTC

Overrule IBATIS caching

Hi All,

We have an application that runs on different servers ... 
On one server we want to overrule to IBATIS caching like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config
2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">

<sqlMapConfig>
    <properties resource="ibatis.properties"/>
    <settings cacheModelsEnabled="${ibatis.cacheModelsEnabled}"/>
    
    ...
 
</sqlMapConfig>

We also have an ibatis.properties file which contains the key
ibatis.cacheModelsEnabled = true

But this doesn't seem to work ...

Any advice ?



Re: Overrule IBATIS caching

Posted by Jeff Butler <je...@gmail.com>.
I think your change looks good - and it reuses well tested code.

I'd say that you could go ahead and commit it.  We'll have a beta period for
2.3 (probably a week or two), then a vote for GA.  Committing it for the
release will get it into wider use.

Jeff Butler


On 11/26/06, Larry Meadors <lm...@apache.org> wrote:
>
> OK, I looked at this more, and have the code changed locally, but have
> not committed it yet for a few reasons:
>
> 1) It's a bigger change than I expected (including a change to
> sql-map-config-2.dtd)
> 2) We have a release coming soon and I do not want to break it.
> 3) I have not tested it yet
>
> So, if you want to try it out, the only code change is in
> SqlMapConfigParser.java (attached), but as I said, it is not tested,
> and will require that you also change your sqlmap config dtd (changed
> version also attached).
>
> I guess this also gives everyone an opportunity to chime in on this
> change before it goes in.
>
> Thoughts anyone?
>
> Larry
>
>
> On 11/24/06, Larry Meadors <lm...@apache.org> wrote:
> > OK, think I found this, but since today is a holiday, and we have FOUR
> > INCHES OF FRESH SNOW, I need to take my kids sledding (or they need to
> > take me sledding?).
> >
> > At any rate, I won't get to it until this evening.
> >
> > Priorities. :-)
> >
> > Larry
> >
> >
> > On 11/24/06, Larry Meadors <lm...@apache.org> wrote:
> > > Guillaume is correct. The settings element is not pre-processed like
> > > other elements are.
> > >
> > > ..although I am not sure why. I'll look at that and see if I can fix
> it.
> > >
> > > Larry
> > >
> > >
> > > On 11/24/06, Guillaume Carré <gu...@gmail.com> wrote:
> > > > 2006/11/24, Tom Stroobants <To...@persgroep.be>:
> > > > >
> > > > > Hi All,
> > > > >
> > > > > We have an application that runs on different servers ...
> > > > > On one server we want to overrule to IBATIS caching like this:
> > > > >
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config
> > > > > 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> > > > >
> > > > > <sqlMapConfig>
> > > > >     <properties resource="ibatis.properties"/>
> > > > >     <settings cacheModelsEnabled="${ibatis.cacheModelsEnabled}"/>
> > > > >
> > > > >     ...
> > > > >
> > > > > </sqlMapConfig>
> > > > >
> > > > > We also have an ibatis.properties file which contains the key
> > > > > ibatis.cacheModelsEnabled = true
> > > > >
> > > > > But this doesn't seem to work ...
> > > > >
> > > > > Any advice ?
> > > >
> > > > Hello,
> > > >
> > > > there is no way to overrule caching, with ${} properties, or with
> the API.
> > > >
> > > > I posted almost the same question here 2 weeks ago.
> > > >
> http://www.mail-archive.com/user-java@ibatis.apache.org/msg06763.html
> > > > --
> > > > Guillaume Carré
> > > >
> > >
> >
>
>
>

Re: Overrule IBATIS caching

Posted by Larry Meadors <lm...@apache.org>.
OK, I looked at this more, and have the code changed locally, but have
not committed it yet for a few reasons:

1) It's a bigger change than I expected (including a change to
sql-map-config-2.dtd)
2) We have a release coming soon and I do not want to break it.
3) I have not tested it yet

So, if you want to try it out, the only code change is in
SqlMapConfigParser.java (attached), but as I said, it is not tested,
and will require that you also change your sqlmap config dtd (changed
version also attached).

I guess this also gives everyone an opportunity to chime in on this
change before it goes in.

Thoughts anyone?

Larry


On 11/24/06, Larry Meadors <lm...@apache.org> wrote:
> OK, think I found this, but since today is a holiday, and we have FOUR
> INCHES OF FRESH SNOW, I need to take my kids sledding (or they need to
> take me sledding?).
>
> At any rate, I won't get to it until this evening.
>
> Priorities. :-)
>
> Larry
>
>
> On 11/24/06, Larry Meadors <lm...@apache.org> wrote:
> > Guillaume is correct. The settings element is not pre-processed like
> > other elements are.
> >
> > ..although I am not sure why. I'll look at that and see if I can fix it.
> >
> > Larry
> >
> >
> > On 11/24/06, Guillaume Carr� <gu...@gmail.com> wrote:
> > > 2006/11/24, Tom Stroobants <To...@persgroep.be>:
> > > >
> > > > Hi All,
> > > >
> > > > We have an application that runs on different servers ...
> > > > On one server we want to overrule to IBATIS caching like this:
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config
> > > > 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> > > >
> > > > <sqlMapConfig>
> > > >     <properties resource="ibatis.properties"/>
> > > >     <settings cacheModelsEnabled="${ibatis.cacheModelsEnabled}"/>
> > > >
> > > >     ...
> > > >
> > > > </sqlMapConfig>
> > > >
> > > > We also have an ibatis.properties file which contains the key
> > > > ibatis.cacheModelsEnabled = true
> > > >
> > > > But this doesn't seem to work ...
> > > >
> > > > Any advice ?
> > >
> > > Hello,
> > >
> > > there is no way to overrule caching, with ${} properties, or with the API.
> > >
> > > I posted almost the same question here 2 weeks ago.
> > > http://www.mail-archive.com/user-java@ibatis.apache.org/msg06763.html
> > > --
> > > Guillaume Carr�
> > >
> >
>

Re: Overrule IBATIS caching

Posted by Larry Meadors <lm...@apache.org>.
OK, think I found this, but since today is a holiday, and we have FOUR
INCHES OF FRESH SNOW, I need to take my kids sledding (or they need to
take me sledding?).

At any rate, I won't get to it until this evening.

Priorities. :-)

Larry


On 11/24/06, Larry Meadors <lm...@apache.org> wrote:
> Guillaume is correct. The settings element is not pre-processed like
> other elements are.
>
> ..although I am not sure why. I'll look at that and see if I can fix it.
>
> Larry
>
>
> On 11/24/06, Guillaume Carré <gu...@gmail.com> wrote:
> > 2006/11/24, Tom Stroobants <To...@persgroep.be>:
> > >
> > > Hi All,
> > >
> > > We have an application that runs on different servers ...
> > > On one server we want to overrule to IBATIS caching like this:
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config
> > > 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> > >
> > > <sqlMapConfig>
> > >     <properties resource="ibatis.properties"/>
> > >     <settings cacheModelsEnabled="${ibatis.cacheModelsEnabled}"/>
> > >
> > >     ...
> > >
> > > </sqlMapConfig>
> > >
> > > We also have an ibatis.properties file which contains the key
> > > ibatis.cacheModelsEnabled = true
> > >
> > > But this doesn't seem to work ...
> > >
> > > Any advice ?
> >
> > Hello,
> >
> > there is no way to overrule caching, with ${} properties, or with the API.
> >
> > I posted almost the same question here 2 weeks ago.
> > http://www.mail-archive.com/user-java@ibatis.apache.org/msg06763.html
> > --
> > Guillaume Carré
> >
>

Re: Overrule IBATIS caching

Posted by Larry Meadors <lm...@apache.org>.
Guillaume is correct. The settings element is not pre-processed like
other elements are.

..although I am not sure why. I'll look at that and see if I can fix it.

Larry


On 11/24/06, Guillaume Carré <gu...@gmail.com> wrote:
> 2006/11/24, Tom Stroobants <To...@persgroep.be>:
> >
> > Hi All,
> >
> > We have an application that runs on different servers ...
> > On one server we want to overrule to IBATIS caching like this:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config
> > 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> >
> > <sqlMapConfig>
> >     <properties resource="ibatis.properties"/>
> >     <settings cacheModelsEnabled="${ibatis.cacheModelsEnabled}"/>
> >
> >     ...
> >
> > </sqlMapConfig>
> >
> > We also have an ibatis.properties file which contains the key
> > ibatis.cacheModelsEnabled = true
> >
> > But this doesn't seem to work ...
> >
> > Any advice ?
>
> Hello,
>
> there is no way to overrule caching, with ${} properties, or with the API.
>
> I posted almost the same question here 2 weeks ago.
> http://www.mail-archive.com/user-java@ibatis.apache.org/msg06763.html
> --
> Guillaume Carré
>

Re: Overrule IBATIS caching

Posted by Guillaume Carré <gu...@gmail.com>.
2006/11/24, Tom Stroobants <To...@persgroep.be>:
>
> Hi All,
>
> We have an application that runs on different servers ...
> On one server we want to overrule to IBATIS caching like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config
> 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>
> <sqlMapConfig>
>     <properties resource="ibatis.properties"/>
>     <settings cacheModelsEnabled="${ibatis.cacheModelsEnabled}"/>
>
>     ...
>
> </sqlMapConfig>
>
> We also have an ibatis.properties file which contains the key
> ibatis.cacheModelsEnabled = true
>
> But this doesn't seem to work ...
>
> Any advice ?

Hello,

there is no way to overrule caching, with ${} properties, or with the API.

I posted almost the same question here 2 weeks ago.
http://www.mail-archive.com/user-java@ibatis.apache.org/msg06763.html
-- 
Guillaume Carré