Spring + ehcache + bigmemory go integration

988 Views Asked by At

I am integrating spring3.2 + ehcache + bigmemory go.

Firstly, i do not undertand what is the term "Save the BigMemory Go license-key file to the BigMemory Go home directory." What would be my BigMemory Go home directory in my java web application deployed on glassfish.

Request Help.

Secondly, i get this error: nested exception is net.sf.ehcache.CacheException: Cannot instantiate enterprise features manager

Following is are my files;

<bean id="ehcacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
   <property name="configLocation" value="/WEB-INF/ehcache.xml" />    
      <property name="shared" value="true" />          
</bean>

Code:

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" name="myBigMemoryGoConfig">      
    <diskStore path="C:/bigmemorygo"/>
 <cache name="CACHE_GEN" maxBytesLocalHeap="124M" maxBytesLocalOffHeap="1G">
     <persistence strategy="localRestartable"/>
 </cache>  
 <cache name="CACHE_CMP" maxBytesLocalHeap="124M" maxBytesLocalOffHeap="1G">
     <persistence strategy="localRestartable"/>
 </cache>  

 </ehcache>

Help appreciated.

Thanks, Godwin

1

There are 1 best solutions below

0
On

For the BigMemory license, it just needs to be in your application classpath...2 ways to do this:

  • Copy the license file in your application's "WEB-INF/classes" folder (if using maven to build, that'd be in the /src/main/resources folder...)
  • Or, if you don't want to copy the license file in your application, add the JVM param "-Dcom.tc.productkey.path=" to your app server startup script (or JAVA_OPTS for example)

For the exception, might be related to the license...Please show us the exception stack if you can.

Hope that helps.