-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: How to share cache among different web applications?
PostPosted: Sat Aug 20, 2005 11:30 am 
Newbie

Joined: Sat Aug 20, 2005 10:58 am
Posts: 4
eg. webapp1 and webapp2 are web applications in Tomcat. How to setup Hibernate and Tomcat to make the above 2 web applications share one cache?

thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 20, 2005 1:20 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
What are you trying to cache? The sessionFactory? If so, The most recent version of Tomcat ships w/ read only JNDI, so you'll have to switch to a more managed environment like JBoss and role your sleaves up for JTA and HAR deployment.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 21, 2005 10:12 am 
Newbie

Joined: Sat Aug 20, 2005 10:58 am
Posts: 4
thanks for your reply.
the cache i want to share is Second Level Cache and Query Cache.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 21, 2005 3:07 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
See hibernate configuration properties with "hibernate.cache" prefix and you will need to configure cache provider (TreeCache for example). And do not forget stuff like materialized views, indexes and clusters ( probably you will not need to share any cache ... )


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 22, 2005 2:41 am 
Newbie

Joined: Sat Aug 20, 2005 10:58 am
Posts: 4
thanks.
i have managed to use cache in each one of the 2 application. but the 2 apps use one db. if i insert a record in app1, sqls that utilize cache in app2 will not get the record just inserted. how can i tell app2 that db is changed and discard the cache accordingly?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.