-->
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: cache problem with multiple database
PostPosted: Fri Feb 20, 2004 8:15 am 
Newbie

Joined: Wed Oct 22, 2003 5:33 am
Posts: 10
Location: france
hi every body

i got a problem with hibernate cache
im using hibernate 2.1 with ehcache and jboss 3.2.3

is there any solution to use one cache instance by session factory instead of unique cache for all session factory ?

because the same mapping object is used in different database with auto increment id.

ps : i dont want to modify the auto increment sequence


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2004 1:00 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
hibernate.cache.region_prefix


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2004 1:59 pm 
Newbie

Joined: Wed Oct 22, 2003 5:33 am
Posts: 10
Location: france
thanks gavin for your reply

but with jboss region prefix are not allowed in hibernate-service.xml
where can i put this properties for each session factory ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2004 5:41 pm 
Newbie

Joined: Wed Oct 22, 2003 5:33 am
Posts: 10
Location: france
hi gavin

i do a little modification

in net.sf.hibernate.jmx.HibernateService adding 2 methods

public void setHibernateCacheRegionPrefix(String hibernateCacheRegionPrefix) {
setProperty(Environment.CACHE_REGION_PREFIX, hibernateCacheRegionPrefix);
}

public String getHibernateCacheRegionPrefix() {
return getProperty(Environment.CACHE_REGION_PREFIX);
}




net.sf.hibernate.jmx.HibernateServiceMBean adding 2 methods

public void setHibernateCacheRegionPrefix(String hibernateCacheRegionPrefix);

public String getHibernateCacheRegionPrefix();


now its possible to add attribute

<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory.....
.....
<attribute name="HibernateCacheRegionPrefix">THE_REGION</attribute>


its work for me

best regards[quote][/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2004 2:44 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Please add this to JIRA, it won't be lost.

_________________
Emmanuel


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.