It's not a secret anymore!*
The moose likes Other Open Source Projects and the fly likes ehcache1.5 -Can I remove Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "ehcache1.5 -Can I remove "defaultCache"? Can I have "ehcache.xml" in 2 Proj, where 1 reference other" Watch "ehcache1.5 -Can I remove "defaultCache"? Can I have "ehcache.xml" in 2 Proj, where 1 reference other" New topic

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

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
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.
I agree. Here's the link:
subject: ehcache1.5 -Can I remove "defaultCache"? Can I have "ehcache.xml" in 2 Proj, where 1 reference other
Similar Threads
Renamed "ehcache.xml" to "myehcache.xml" - Cannot find the declaration of element 'ehcache'
Call a package from another project
Publishing to jboss from eclipse
A problem of classpaths and Xerces Jars
requestdispatch - servlet to servlet in iplanet( anyone plzzzzzzz!!!!)