• Post Reply Bookmark Topic Watch Topic
  • New Topic

ehcache1.5 -Can I remove "defaultCache"? Can I have "ehcache.xml" in 2 Proj, where 1 reference other  RSS feed

Sam Gehouse
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using ehcache 1.5. I have the following questions:

1. Is it ok to remove the "defaultCache" entry from "ehcache.xml", that comes with it, when I download the ehcache.jar?
I think it gets called internally by the ehcache jar and not ok to remove it. When I removed it, I got exception thrown while running the code. I am talking about the block as:

2. Is it ok to have two different "ehcache.xml" in two different projects e.g. Proj1 and Proj2, if one project references the other project, considering both "ehcache.xml" will be in classpath?

In other words, Proj1 has "ehcache.xml" under the src folder. Proj 2 also has "ehcache.xml" under the src folder. As such, "ehcache.xml" will be available in the classpath from both Proj1 and Proj2. Will there be a conflict, if two different "ehcache.xml" are available in the classpath? I have not tried putting the same name of the XML in two different projects yet. I wanted to know the implications of keeping the same name for "ehcache.xml" in two different projects, where "ehcache.xml" is in classpath from both the projects, as one project references the other.

Obviously, the cache entries are unique in two different "ehcache.xml".

Or, do I need to change the name of the XML file (e.g., change from "ehcache.xml" to "proj1-cache.xml) in at least in one of the projects, so that there is no conflict?

3. If two different "ehcache.xml" are in two different projects and one project refernces the other (as described in point 2) and both "ehcache.xml" have "defaultCache" entry in the XML, will there be a conflict? Especially, if the value of "defaultCache" entry in "ehcache.xml" in one project differes from the value of "defaultCache" entry of "ehcache.xml" found in the other project?

The Proj 1 and Proj2 are added as two different jars files in a EAR file

Please advise.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!