I have the following code in my config xml file:
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.2">
<locking isolationLevel="READ_COMMITTED" nodeLockingScheme="mvcc"
useLockStriping="false" concurrencyLevel="1500"
lockParentForChildInsertRemove="false" lockAcquisitionTimeout="10000"
writeSkewCheck="true" />
<!-- 0 = no eviction -->
<eviction wakeUpInterval="500" />
<loaders passivation="false" shared="false">
<preload>
<node fqn="/" />
</preload>
<loader class="org.jboss.cache.loader.FileCacheLoader" async="false"
fetchPersistentState="true">
<properties>
location=/${env.VG_HOME}/cacheloader
</properties>
</loader>
</loaders>
</jbosscache>
where VG_HOME is an env var which points to a local folder.
I have tested this setup on Linux and Windows using a Jetty server and it worked as expected.
Under tomcat 7, I created the setenv.sh/bat with set "VG_HOME=C:\config". However, when starting the app, the cacheloader folder is created under the root (both windows/linux), with the following name ${env.VG_HOME}. I suspect that the location property in the xml does not see the env set in the setenv.sh/bat file.
Any ideas on a fix, meaning the app creates the folder under the right location when using Tomcat.
Thanks!