-->
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.  [ 4 posts ] 
Author Message
 Post subject: persistence.xml properties for cache provider?
PostPosted: Sat Jan 12, 2008 10:21 pm 
Newbie

Joined: Sat Jan 12, 2008 10:17 pm
Posts: 2
I can't seem to see the properties I place in the persistence.xml in the set of properties provided to the l2 cache provider. I'm trying to provide provider properties in the persistence.xml properties section and access them from the cache provider.

Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 2:24 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Here are some properties from my persistence.xml:

Code:
<properties>
   <property
      name="foo.bar.MyClass"
      value="read-write" />

   <!-- 2nd level cache  -->
   <property name="hibernate.cache.provider_class"
      value="net.sf.ehcache.hibernate.SingletonEhCacheProvider" />
   <property name="hibernate.cache.use_second_level_cache"
      value="true" />
   <property name="hibernate.generate_statistics" value="true" />
   <property name="hibernate.cache.use_structured_entries"
      value="true" />

   <property name="hibernate.hbm2ddl.auto" value="create-drop" />
   <property name="hibernate.show_sql" value="false" />
   <property name="hibernate.format_sql" value="false" />

</properties>


You find more information here: http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/configuration.html

I hope this helps :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 11:41 am 
Newbie

Joined: Sat Jan 12, 2008 10:17 pm
Posts: 2
That much I know :). The problem is if I add my own properties (non hibernate ones) to that list, they are not in the list of properties passed to the start method of the cache provider.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 15, 2008 6:25 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I looked at the code and did some tests but I can't find why you are seeing this behavior. Are you sure they disappeared? You don't have multiple PU set up?
Try to give the debugger a try, the method filling up the Cache provider is CacheFactory.createCache

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.