Hi Kalle

Are you looking specifically for a Hibernate solution?

If you use PostgreSQL, there are notifications such as Listen / Notify, which I 
expect would do the job.

Kind regards,
Peter


----- Original Message -----
From: "Kalle Korhonen" <kalle.o.korho...@gmail.com>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Tuesday, 17 November, 2009 00:48:03 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Best practice for database notifications?

Thanks Thiago. Yes, 2nd level cache is great for some use cases and I
use them whevever possible but not in this case - when this data
changes, the new data needs to picked up immediately. Evicting the
cache doesn't give me much more - I still need to add in the logic to
evict it - although, a configurable cache evicting Hibernate
transaction advisor would be simpler to write... hmm maybe you got
something there. Any other takers?

Kalle


On Mon, Nov 16, 2009 at 2:20 PM, Thiago H. de Paula Figueiredo
<thiag...@gmail.com> wrote:
> What about using a second-level cache in Hibernate and configure it to live
> for a couple hours? You can also use the SessionFactory methods that clear
> the second level cache programatically: evict(Class persistentClass) and
> evictQueries(String cacheRegion).
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to