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 Anthony Hong <an...@gmail.com> on 2006/06/30 13:57:37 UTC

Fwd: Unit test problem with sql cache

I use db unit test to do intergration test with sql.
One of me selection with cache in sqlmap.
Backend data are insert via db script automatic so there is no chance
to trigger ibatis to update selection cache.
How to solve this problem? I want to disable cache in unit testint
mode. And enable it during web application page.

--

Anthony Hong


-- 

Anthony Hong

Re: Re: Unit test problem with sql cache

Posted by Graeme J Sweeney <ib...@gjsweeney.com>.
On Mon, 3 Jul 2006, Anthony Hong wrote:

> Is this impossible to achieve?

If there is no inherent iBatis solution then an alternative is to change 
your build configuration to pull in the correct config file at run time.

-- 
Graeme -

Re: Re: Unit test problem with sql cache

Posted by Anthony Hong <an...@gmail.com>.
Is this impossible to achieve?

On 6/30/06, Anthony Hong <an...@gmail.com> wrote:
> Thanks,  I already tried it, but doesn't work.
> DTD only accept true/false for this attribute.
>
>
> On 6/30/06, Torsten Michelmann <to...@gmx.de> wrote:
> > Not sure if it works, but you might try to define a variable named eg. isCacheEnabled in your properties file (access it via <properties resource="your.properties"/>) and then you can use
> > cacheModelsEnabled=${isCacheEnabled}
> >
> >
> >
> > -------- Original-Nachricht --------
> > Datum: Fri, 30 Jun 2006 21:23:56 +0800
> > Von: Anthony Hong <an...@gmail.com>
> > An: user-java@ibatis.apache.org
> > Betreff: Re: Unit test problem with sql cache
> >
> > > I saw sqlMapconfig has settings with cacheModelsEnabled
> > > How to change it dynamicly. Or Can I seperate sql map settings and sql
> > > map resource into two file and merge them in using?
> > >
> > > On 6/30/06, Anthony Hong <an...@gmail.com> wrote:
> > > > I use db unit test to do intergration test with sql.
> > > > One of me selection with cache in sqlmap.
> > > > Backend data are insert via db script automatic so there is no chance
> > > > to trigger ibatis to update selection cache.
> > > > How to solve this problem? I want to disable cache in unit testint
> > > > mode. And enable it during web application page.
> > > >
> > > > --
> > > >
> > > > Anthony Hong
> > > >
> > > >
> > > > --
> > > >
> > > > Anthony Hong
> > > >
> > >
> > >
> > > --
> > >
> > > Anthony Hong
> >
> > --
> > Gruß
> > Torsten Michelmann
> >
> > "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
> > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> >
>
>
> --
>
> Anthony Hong
>


-- 

Anthony Hong

Re: Re: Unit test problem with sql cache

Posted by Anthony Hong <an...@gmail.com>.
Thanks,  I already tried it, but doesn't work.
DTD only accept true/false for this attribute.


On 6/30/06, Torsten Michelmann <to...@gmx.de> wrote:
> Not sure if it works, but you might try to define a variable named eg. isCacheEnabled in your properties file (access it via <properties resource="your.properties"/>) and then you can use
> cacheModelsEnabled=${isCacheEnabled}
>
>
>
> -------- Original-Nachricht --------
> Datum: Fri, 30 Jun 2006 21:23:56 +0800
> Von: Anthony Hong <an...@gmail.com>
> An: user-java@ibatis.apache.org
> Betreff: Re: Unit test problem with sql cache
>
> > I saw sqlMapconfig has settings with cacheModelsEnabled
> > How to change it dynamicly. Or Can I seperate sql map settings and sql
> > map resource into two file and merge them in using?
> >
> > On 6/30/06, Anthony Hong <an...@gmail.com> wrote:
> > > I use db unit test to do intergration test with sql.
> > > One of me selection with cache in sqlmap.
> > > Backend data are insert via db script automatic so there is no chance
> > > to trigger ibatis to update selection cache.
> > > How to solve this problem? I want to disable cache in unit testint
> > > mode. And enable it during web application page.
> > >
> > > --
> > >
> > > Anthony Hong
> > >
> > >
> > > --
> > >
> > > Anthony Hong
> > >
> >
> >
> > --
> >
> > Anthony Hong
>
> --
> Gruß
> Torsten Michelmann
>
> "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
>


-- 

Anthony Hong

Re: Re: Unit test problem with sql cache

Posted by Torsten Michelmann <to...@gmx.de>.
Not sure if it works, but you might try to define a variable named eg. isCacheEnabled in your properties file (access it via <properties resource="your.properties"/>) and then you can use 
cacheModelsEnabled=${isCacheEnabled}



-------- Original-Nachricht --------
Datum: Fri, 30 Jun 2006 21:23:56 +0800
Von: Anthony Hong <an...@gmail.com>
An: user-java@ibatis.apache.org
Betreff: Re: Unit test problem with sql cache

> I saw sqlMapconfig has settings with cacheModelsEnabled
> How to change it dynamicly. Or Can I seperate sql map settings and sql
> map resource into two file and merge them in using?
> 
> On 6/30/06, Anthony Hong <an...@gmail.com> wrote:
> > I use db unit test to do intergration test with sql.
> > One of me selection with cache in sqlmap.
> > Backend data are insert via db script automatic so there is no chance
> > to trigger ibatis to update selection cache.
> > How to solve this problem? I want to disable cache in unit testint
> > mode. And enable it during web application page.
> >
> > --
> >
> > Anthony Hong
> >
> >
> > --
> >
> > Anthony Hong
> >
> 
> 
> -- 
> 
> Anthony Hong

-- 
Gruß
Torsten Michelmann

"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

Re: Unit test problem with sql cache

Posted by Anthony Hong <an...@gmail.com>.
I saw sqlMapconfig has settings with cacheModelsEnabled
How to change it dynamicly. Or Can I seperate sql map settings and sql
map resource into two file and merge them in using?

On 6/30/06, Anthony Hong <an...@gmail.com> wrote:
> I use db unit test to do intergration test with sql.
> One of me selection with cache in sqlmap.
> Backend data are insert via db script automatic so there is no chance
> to trigger ibatis to update selection cache.
> How to solve this problem? I want to disable cache in unit testint
> mode. And enable it during web application page.
>
> --
>
> Anthony Hong
>
>
> --
>
> Anthony Hong
>


-- 

Anthony Hong