|
From: Srinivasan, N. \(Cognizant\) <Nit...@co...> - 2006-08-30 07:17:47
|
Could anybody plz help with EHCache?
My project has=0D
1.ehcache.xml which has the path where the datafiles have to be stored
2.another xml where i configure all my bean
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id=3D"cacheManager"
class=3D"org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name=3D"configLocation">
<value>ehcache.xml</value>
</property>
</bean>
<bean id=3D"methodCache"
class=3D"org.springframework.cache.ehcache.EhCacheFactoryBean">
<property name=3D"cacheManager">
<ref local=3D"cacheManager"/>
</property>
<property name=3D"cacheName">
<value>com.po.TestClass</value>
</property>
</bean>
<bean id=3D"methodCacheInterceptor"
class=3D"com.po.Interceptor.MethodCacheInterceptor">
<property name=3D"cache">
<ref local=3D"methodCache" />
</property>
</bean>
<bean id=3D"methodCachePointCut"
class=3D"org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name=3D"advice">
<ref local=3D"methodCacheInterceptor"/>
</property>
<property name=3D"patterns">
<list>=0D
<value>.*methodOne</value>
<value>.*methodTwo</value>
</list>
</property>
</bean>
<bean id=3D"myBean"
class=3D"org.springframework.aop.framework.ProxyFactoryBean">
<property name=3D"target">
<bean class=3D"com.po.TestClass"/>
</property>
<property name=3D"interceptorNames">
<list>
<value>methodCachePointCut</value>
</list>
</property>
</bean>
</beans>
=0D
3.MethodCacheInterceptor.java where i obtain the cache key
4.TestClass that has the methods methodOne and methodTwo that are to be
cached
5.TestCache class that has the main method.
public class TestCache {
public static void main(String arg[])
{
Resource res =3D new
ClassPathResource("springServlet-servlet.xml");
AbstractBeanFactory ft =3D new
XmlBeanFactory(res);
//Instantiate an object
TestClass testObject =3D (TestClass) ft.getBean("cacheManager");
testObject.methodOne();
=0D
=0D
=0D
}
}
=0D
I get the following error.Could you plz help me with this issue?
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'cacheManager' defined in class path resource
[springServlet-servlet.xml]: Initialization of bean failed; nested
exception is net.sf.ehcache.CacheException: Cannot configure
CacheManager:
file:/D:/WorkSpace/EHCacheDemo/WebRoot/WEB-INF/classes/ehcache.xml:3:
Element <xml-body> does not allow nested <ehcache> elements.
=0D
Thanks
Nithya
________________________________
From: spr...@li...
[mailto:spr...@li...] On
Behalf Of Juergen Hoeller
Sent: Tuesday, August 29, 2006 10:47 PM
To: spr...@li...
Subject: Re: [Springframework-developer] Nightly builds
Indeed... why has the nightly build process stopped?
=0D
Juergen
=0D
________________________________
From: spr...@li...
[mailto:spr...@li...] On
Behalf Of Grant D Gochnauer
Sent: Tuesday, August 29, 2006 4:56 PM
To: spr...@li...
Subject: [Springframework-developer] Nightly builds
I was just curious when we'd see nightly builds again? It appears they
are stuck on Aug 22nd. There was a fix or two that has been checked in
after August 22nd that I'd like to test out.
=0D
Thanks!
-Grant
=0D
This e-mail and any files transmitted with it are for the sole use of the=
intended recipient(s) and may contain confidential and privileged=
information.
If you are not the intended recipient, please contact the sender by reply=
e-mail and destroy all copies of the original message.=0D
Any unauthorized review, use, disclosure, dissemination, forwarding,=
printing or copying of this email or any action taken in reliance on this=
e-mail is strictly=0D
prohibited and may be unlawful.
Visit us at http://www.cognizant.com |