Re: [Resteasy-users] Use Resteasy server-side Cache
Thank you for the reply, so I added @Cache to my Service and "@Context ServerCache cache" as parameter to the Cache annotated Service, in the web.xml i added the following server.request.cache.infinispan.config.file infinispan.xml server.request.cache.infinispan.cache.name MyCache Couldn't really find something about the cache config file so I didn't know what todo. Next up I created a new Class public class Application extends javax.ws.rs.core.Application { public Set> getClasses() { return super.getClasses(); } } and changed the web.xml to Resteasy org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher javax.ws.rs.Application net.devvsbugs.coding.daraku_mal_api.Application is this all I need to do? Does it has something with the cache config file todo? Thank you. > Date: Wed, 29 Oct 2014 15:13:45 -0400 > From: bbu...@redhat.com > To: resteasy-users@lists.sourceforge.net > Subject: Re: [Resteasy-users] Use Resteasy server-side Cache > > Implementation was refactored and reimplemneted in 3.0: > > http://docs.jboss.org/resteasy/docs/3.0.9.Final/userguide/html/Cache_NoCache_CacheControl.html#server_cache > > On 10/29/2014 1:35 PM, Frederic Eßer wrote: > > Hello everyone, > > > > I develop a software which provides webservices on a tomcat. These > > webservices parse and display data from a 3rd website with JSOUP in XML > > or JSON format. > > Now I want to use the server-side caching to reduce the requests be made > > to these websites. > > The Project is managed with Maven and I'm using the 3.0.6.Final version > > of resteasy and it will all be deployed on an integrated Tomcat 7 for > > testing purposes. > > > > While researching on how to get the caching into my project I stumbled > > upon this link > > http://docs.jboss.org/resteasy/docs/1.1.GA/userguide/html/Cache_NoCache_CacheControl.html > > which I thought contained everything I needed. So I added the dependency > > to my pom > > > > > > org.jboss.resteasy > > resteasy-cache-core > > 3.0.9.Final > > > > > > and added the context parameter to my web.xml > > > > > > resteasy.server.cache.maxsize > > 1000 > > > > > > > > > > resteasy.server.cache.eviction.wakeup.interval > > 5000 > > > > > > > > > > org.jboss.resteasy.plugins.cache.server.ServletServerCache > > > > > > But while trying to run the project on my server I get the following > > exception > > > > SEVERE: Error configuring application listener of class > > org.jboss.resteasy.plugins.cache.server.ServletServerCache > > java.lang.ClassNotFoundException: > > org.jboss.resteasy.plugins.cache.server.ServletServerCache > > at > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676) > > at > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521) > > at > > org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415) > > at > > org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397) > > at > > org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118) > > at > > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4638) > > at > > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) > > at > > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199) > > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > > at java.lang.Thread.run(Thread.java:745) > > > > So I build the war with Maven -> build and checked for the jar file in > > WEB-INF/lib/ and found the resteasy-cache-core-3.0.9.Final.jar. > > > > What is going wrong? Or is the way on approaching the server-side cache > > implementation wrong? > > > > Thank you. > > > > > > -- > &
Re: [Resteasy-users] Use Resteasy server-side Cache
Implementation was refactored and reimplemneted in 3.0: http://docs.jboss.org/resteasy/docs/3.0.9.Final/userguide/html/Cache_NoCache_CacheControl.html#server_cache On 10/29/2014 1:35 PM, Frederic Eßer wrote: > Hello everyone, > > I develop a software which provides webservices on a tomcat. These > webservices parse and display data from a 3rd website with JSOUP in XML > or JSON format. > Now I want to use the server-side caching to reduce the requests be made > to these websites. > The Project is managed with Maven and I'm using the 3.0.6.Final version > of resteasy and it will all be deployed on an integrated Tomcat 7 for > testing purposes. > > While researching on how to get the caching into my project I stumbled > upon this link > http://docs.jboss.org/resteasy/docs/1.1.GA/userguide/html/Cache_NoCache_CacheControl.html > which I thought contained everything I needed. So I added the dependency > to my pom > > > org.jboss.resteasy > resteasy-cache-core > 3.0.9.Final > > > and added the context parameter to my web.xml > > > resteasy.server.cache.maxsize > 1000 > > > > > resteasy.server.cache.eviction.wakeup.interval > 5000 > > > > > org.jboss.resteasy.plugins.cache.server.ServletServerCache > > > But while trying to run the project on my server I get the following > exception > > SEVERE: Error configuring application listener of class > org.jboss.resteasy.plugins.cache.server.ServletServerCache > java.lang.ClassNotFoundException: > org.jboss.resteasy.plugins.cache.server.ServletServerCache > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521) > at > org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415) > at > org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397) > at > org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118) > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4638) > at > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) > at > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > > So I build the war with Maven -> build and checked for the jar file in > WEB-INF/lib/ and found the resteasy-cache-core-3.0.9.Final.jar. > > What is going wrong? Or is the way on approaching the server-side cache > implementation wrong? > > Thank you. > > > -- > > > > ___ > Resteasy-users mailing list > Resteasy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com -- ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
[Resteasy-users] Use Resteasy server-side Cache
Hello everyone, I develop a software which provides webservices on a tomcat. These webservices parse and display data from a 3rd website with JSOUP in XML or JSON format. Now I want to use the server-side caching to reduce the requests be made to these websites. The Project is managed with Maven and I'm using the 3.0.6.Final version of resteasy and it will all be deployed on an integrated Tomcat 7 for testing purposes. While researching on how to get the caching into my project I stumbled upon this link http://docs.jboss.org/resteasy/docs/1.1.GA/userguide/html/Cache_NoCache_CacheControl.html which I thought contained everything I needed. So I added the dependency to my pom org.jboss.resteasy resteasy-cache-core 3.0.9.Final and added the context parameter to my web.xml resteasy.server.cache.maxsize 1000 resteasy.server.cache.eviction.wakeup.interval 5000 org.jboss.resteasy.plugins.cache.server.ServletServerCache But while trying to run the project on my server I get the following exception SEVERE: Error configuring application listener of class org.jboss.resteasy.plugins.cache.server.ServletServerCache java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.cache.server.ServletServerCache at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4638) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) So I build the war with Maven -> build and checked for the jar file in WEB-INF/lib/ and found the resteasy-cache-core-3.0.9.Final.jar. What is going wrong? Or is the way on approaching the server-side cache implementation wrong? Thank you. -- ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users