Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 45237 invoked from network); 16 Jul 2009 16:59:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jul 2009 16:59:01 -0000 Received: (qmail 94665 invoked by uid 500); 16 Jul 2009 17:00:06 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 94646 invoked by uid 500); 16 Jul 2009 17:00:06 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 94638 invoked by uid 99); 16 Jul 2009 17:00:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2009 17:00:06 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of anindya.mukherjee@gmail.com designates 209.85.222.196 as permitted sender) Received: from [209.85.222.196] (HELO mail-pz0-f196.google.com) (209.85.222.196) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2009 16:59:55 +0000 Received: by pzk34 with SMTP id 34so162158pzk.4 for ; Thu, 16 Jul 2009 09:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:references :in-reply-to:subject:date:message-id:mime-version:content-type :x-mailer:thread-index:content-language; bh=11bMx5NbKCqIz92f/6eJfgRwShQ20AVESeKIy15FA8I=; b=EDQl7/G1g6Ach5b6bf6sZYB1EutZTatLIN5M5gzkxhYtsgbsO1b9q1pw9Wc331ADOa 0eJa7kkXS7ycxDJDHaKU3EPAXU2QdW4Tmx8qIQ8WLYA6YMisAJ9JuDsYErgs+YSXj/jM gdeIZco3Yxp6j4NHgngCJVox0wrGjjb/fBjXs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:x-mailer:thread-index:content-language; b=YfKMRyf4NPl9MoTevb79KsaaW+QA/YvgnfvTk5fhpXelUgpfs+8HV5x0LT+x4Z5dAX 159RSjunxAsbPBNyoXkQosMJWQM8AwSUICSQIEreEWCU1/aMBSuaq4n/Wpm+o1SS/ZX6 pGQ1vhb0zoCgX+kbyHbgdobRqoyvt/BT5Qg8E= Received: by 10.115.58.18 with SMTP id l18mr14699217wak.180.1247763573604; Thu, 16 Jul 2009 09:59:33 -0700 (PDT) Received: from mukherjeePC ([220.224.243.225]) by mx.google.com with ESMTPS id d20sm344164waa.47.2009.07.16.09.59.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 16 Jul 2009 09:59:32 -0700 (PDT) From: "Anindya Mukherjee" To: References: <4a5e2db7.1818d00a.11f4.ffffc3a9@mx.google.com> <6892C825A8016D4681D01CF07391E4529BD413@PE-EVS.converge.com> <4a5eadf0.1f588c0a.0b40.3f6e@mx.google.com> <535a60b10907160803m547b139bhaad4f060ea7e7ca8@mail.gmail.com> In-Reply-To: <535a60b10907160803m547b139bhaad4f060ea7e7ca8@mail.gmail.com> Subject: RE: Force cache refresh + precaching Date: Thu, 16 Jul 2009 22:29:11 +0530 Message-ID: <4a5f5c74.1437720a.769d.1c96@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01CA0664.DB4503F0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcoGKcJ+sgG/eZpKSYqZob1n9HjnuwADNHYA Content-Language: en-ca X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_000B_01CA0664.DB4503F0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Ok got it.. Makes sense actually.. So looks like the only way to = precache is running all the possible queries ( that I expect ) during = app load.=20 =20 - Anindya =20 From: Chris O'Connell [mailto:oconnell@gorillachicago.com]=20 Sent: July-16-09 8:33 PM To: user-java@ibatis.apache.org Subject: Re: Force cache refresh + precaching =20 Since no one else has replied... I think you are looking at the iBatis = cache the wrong way. My understanding of the cache is that it doesn't = cache data from a table, it caches the results of queries. Note that = the code to refresh the cache takes the name of the query that you want = refreshed, not the name of a table that you want refreshed. =20 -- Chris On Wed, Jul 15, 2009 at 11:34 PM, Anindya Mukherjee = wrote: Hi all, Thanks a lot for your replies. Actually our's is a web application that makes a lot of AJAX calls to get this data. We want these call's to be = as fast as possible. A slight delay even for the first time might be an = issue. So we were thinking if there is a way to precache the whole table during = app start rather than having it on demand. The problem with running the queries on app startup is , we have a lot = of data in the table. We could call the queries but that will be a lot of call's. Also if the data changes we have to add/remove our queries. So = if there is a way of telling IBatis to precache the whole table it will be really nice. - Anindya -----Original Message----- From: Jeff Butler [mailto:jeffgbutler@gmail.com] Sent: July-16-09 2:15 AM To: user-java@ibatis.apache.org Subject: Re: Force cache refresh + precaching Why not just execute the query in some startup process, this would prime the cache? In a web app you could do it in a context listener. Easy. Jeff Butler On Wed, Jul 15, 2009 at 3:34 PM, Sundar Sankar = wrote: > I havent implemented this particular case, but I wud have to suggest = you go > with other technologies in conjunction, maybe comet or something like that. > Am not sure if hibernate / hibernate cache handles this case but i wud look > to check up with their dev team too. > > On Wed, Jul 15, 2009 at 1:25 PM, Vinaya Tirikkovalluru > wrote: >> >> Is there a specific reason why do you want to do that? >> >> Because, the first time you access the object, it will be created and >> stored in cache >> >> >> >> >> >> >> >> ________________________________ >> >> From: Anindya Mukherjee [mailto:anindya.mukherjee@gmail.com] >> Sent: Wednesday, July 15, 2009 3:28 PM >> >> To: user-java@ibatis.apache.org >> Subject: RE: Force cache refresh + precaching >> >> >> >> Hi Vinaya, >> >> >> >> Thanks a lot for the help. I actually meant during app load ( when = our >> application is booting ). >> >> >> >> - Anindya >> >> >> >> From: Vinaya Tirikkovalluru = [mailto:vinaya.tirikkovalluru@converge.com] >> Sent: July-16-09 12:41 AM >> To: user-java@ibatis.apache.org >> Subject: RE: Force cache refresh + precaching >> >> >> >> Hi, >> >> >> >> What do you mean by before app load? >> >> >> >> To forcefully refresh the cache, you can use >> >> >> >> getSqlMapClient().flushDataCache("sqlmap.queryname"); >> >> >> >> Vinaya >> >> >> >> ________________________________ >> >> From: Anindya Mukherjee [mailto:anindya.mukherjee@gmail.com] >> Sent: Wednesday, July 15, 2009 3:06 PM >> To: user-java@ibatis.apache.org >> Cc: anindya.mukherjee@gmail.com >> Subject: Force cache refresh + precaching >> >> >> >> Hi , >> >> >> >> We have started using iBatis caches. To start with we are using an = LRU >> cache. However we have an issue , the underlying tables in our db = can be >> updated by manual inserts ( it is a shared db used by a number of = apps ). >> >> >> >> Now we need a mechanism whereby we can forcefully refresh the iBatis >> cache. Can anybody help us with this ? Also the ibatis caches are = lazy >> loading ( it loads on demand ) , is it possible to somehow precache = some >> data during app load. >> >> >> >> - Thanks, >> >> - Anindya >> >> ________________________________ >> >> This electronic message is intended only for the use of the = individual(s) >> or entity(ies) named above and may contain information which is privileged >> and/or confidential. If you are not the intended recipient, be aware = that >> any disclosure, copying, distribution, dissemination or use of the contents >> of this message is prohibited. If you received this message in error, please >> notify the sender immediately. >> >> ________________________________ >> This electronic message is intended only for the use of the = individual(s) >> or entity(ies) named above and may contain information which is privileged >> and/or confidential. If you are not the intended recipient, be aware = that >> any disclosure, copying, distribution, dissemination or use of the contents >> of this message is prohibited. If you received this message in error, please >> notify the sender immediately. > > > -- > Regards > Sundar S. > --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org --=20 --=20 Chris O'Connell Application Developer Gorilla 312.243.8777 x19 ------=_NextPart_000_000B_01CA0664.DB4503F0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Ok got it.. Makes sense actually.. So looks like the only = way to precache is running all the possible queries ( that I expect ) during = app load.

 

-          Anindya

 

From: Chris O'Connell = [mailto:oconnell@gorillachicago.com]
Sent: July-16-09 8:33 PM
To: user-java@ibatis.apache.org
Subject: Re: Force cache refresh + = precaching

 

Since no one else has replied...  I think you = are looking at the iBatis cache the wrong way.  My understanding of the = cache is that it doesn't cache data from a table, it caches the results of = queries.  Note that the code to refresh the cache takes the name of the = query that you want refreshed, not the name of a table that you want = refreshed.

 

-- = Chris

On Wed, Jul 15, 2009 at 11:34 PM, Anindya Mukherjee = <anindya.mukherjee@gmail.com> wrote:

Hi all,

Thanks a lot for your replies. Actually our's is a web application = that
makes a lot of AJAX calls to get this data. We want these call's to be = as
fast as possible. A slight delay even for the first time might be an = issue.

So we were thinking if there is a way to precache the whole table during = app
start rather than having it on demand.

The problem with running the queries on app startup is , we have a lot = of
data in the table. We could call the queries but that will be a lot = of
call's. Also if the data changes we have to add/remove our queries. So = if
there is a way of telling IBatis to precache the whole table it will = be
really nice.

- Anindya

-----Original Message-----
From: Jeff Butler [mailto:
jeffgbutler@gmail.com]
Sent: July-16-09 2:15 AM
To: user-java@ibatis.apache.org
Subject: Re: Force cache refresh + precaching

Why not just execute the query in some startup process, this would
prime the cache?  In a web app you could do it in a context = listener.
Easy.


Jeff Butler

On Wed, Jul 15, 2009 at 3:34 PM, Sundar Sankar<
fatboysuns@gmail.com> = wrote:
> I havent implemented this particular case, but I wud have to = suggest you
go
> with other technologies in conjunction, maybe comet or something = like
that.
> Am not sure if hibernate / hibernate cache handles this case but i = wud
look
> to check up with their dev team too.
>
> On Wed, Jul 15, 2009 at 1:25 PM, Vinaya Tirikkovalluru
> <vinaya.tirikkovalluru@= converge.com> wrote:
>>
>> Is there a specific reason why do you want to do that?
>>
>> Because, the first time you access the object, it will be = created and
>> stored in cache
>>
>>
>>
>>
>>
>>
>>
>> ________________________________
>>
>> From: Anindya Mukherjee [mailto:anindya.mukherjee@gmail.com]
>> Sent: Wednesday, July 15, 2009 3:28 PM
>>
>> To:
user-java@ibatis.apache.org
>> Subject: RE: Force cache refresh + precaching
>>
>>
>>
>> Hi Vinaya,
>>
>>
>>
>> Thanks a lot for the help. I actually meant during app load ( = when our
>> application is booting ).
>>
>>
>>
>> -          = Anindya
>>
>>
>>
>> From: Vinaya Tirikkovalluru [mailto:
vinaya.tirikkovalluru@= converge.com]
>> Sent: July-16-09 12:41 AM
>> To: user-java@ibatis.apache.org
>> Subject: RE: Force cache refresh + precaching
>>
>>
>>
>> Hi,
>>
>>
>>
>> What do you mean by before app load?
>>
>>
>>
>> To forcefully refresh the cache, you can use
>>
>>
>>
>> = getSqlMapClient().flushDataCache("sqlmap.queryname");
>>
>>
>>
>> Vinaya
>>
>>
>>
>> ________________________________
>>
>> From: Anindya Mukherjee [mailto:
anindya.mukherjee@gmail.com]
>> Sent: Wednesday, July 15, 2009 3:06 PM
>> To:
user-java@ibatis.apache.org
>> Cc:
anindya.mukherjee@gmail.com
>> Subject: Force cache refresh + precaching
>>
>>
>>
>> Hi ,
>>
>>
>>
>> We have started using iBatis caches. To start with we are using = an LRU
>> cache. However we have an issue ,  the underlying tables = in our db can be
>> updated by manual inserts ( it is a shared db used by a number = of apps ).
>>
>>
>>
>> Now we need a mechanism whereby we can forcefully refresh the = iBatis
>> cache. Can anybody help us with this ? Also the ibatis caches = are lazy
>> loading ( it loads on demand ) , is it possible to somehow = precache some
>> data during app load.
>>
>>
>>
>> -          = Thanks,
>>
>> -          = Anindya
>>
>> ________________________________
>>
>> This electronic message is intended only for the use of the individual(s)
>> or entity(ies) named above and may contain information which = is
privileged
>> and/or confidential. If you are not the intended recipient, be = aware that
>> any disclosure, copying, distribution, dissemination or use of = the
contents
>> of this message is prohibited. If you received this message in = error,
please
>> notify the sender immediately.
>>
>> ________________________________
>> This electronic message is intended only for the use of the individual(s)
>> or entity(ies) named above and may contain information which = is
privileged
>> and/or confidential. If you are not the intended recipient, be = aware that
>> any disclosure, copying, distribution, dissemination or use of = the
contents
>> of this message is prohibited. If you received this message in = error,
please
>> notify the sender immediately.
>
>
> --
> Regards
> Sundar S.
>

---------------------------------------------------------------------
= To unsubscribe, e-mail:
user-java-unsubsc= ribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.ap= ache.org


---------------------------------------------------------------------
= To unsubscribe, e-mail: user-java-unsubsc= ribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.ap= ache.org




--
--
Chris O'Connell
Application Developer
Gorilla
312.243.8777 x19

------=_NextPart_000_000B_01CA0664.DB4503F0--