Hi, I have a set of JAXRS resources built using Restlet 2.0-RC2 running in Tomcat 6.0. I have servlet that extends org.restlet.ext.servlet.ServerServlet and uses org.restlet.ext.jaxrs.ObjectFactory to create per request resource objects using org.springframework.beans.factory.config.AutowireCapableBeanFactory (Spring 3.0)
I have my resources annotated with Spring transaction for my demarcating DB transactions. I ran a jmeter test with a moderate load of 100 concurrent threads invoking different methods on a resource 50 times each. At the end of my test simulation after forcing java VM garbage collection and viewing the memory contents in JProfiler, I see a number of instances (75) of CGLIB proxies for my resource objects. I also see a number of instances of org.restlet.ext.servlet.internal.ServletCall (102) and a number of instances of org.restlet.representation.InputRepresentation (102) and org.restlet.representation.Variant$1 (104). Apparently there seems to be a memory leak. Just as test, I added calls to another resource that returns a string and does NOT have the Spring transaction around it. I ran the same test against this resource and the same behavior was exhibited. What do I need to do in order to clean up the resources after the request is processed? Are there any examples that use Singleton resource objects using Spring/JAXRS that I can refer to as an alternative approach? What are the advantages/disadvantage of the per-request object approach versus the Singleton resource approach? Thanks very much in advance to your suggestions. Sriram -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/JAXRS-Transactional-Resources-managed-by-Spring-tp5224091p5224091.html Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2626100

