I have jersey running w/ spring, and an embedded jetty server (the config of
the server is in the spring application context XML). I noticed that my
objects that i create, just a simple javabean, thats created in my resource
class never gets garbage collected when i profile my app w/ JProfiler. Any
ideas what could be causing this?
My jersey resource is instantiated by Spring w/ the default type, which i
think is Singleton. I read that most people use "request" scope for their
resources? Woudl it be possible to use singleton still or is that what keeps
the reference to all these objects not being GCed?
The reason i dont have it as request scope is that I receive an error when
trying to use request scope. I think its related to how I start up the jetty
server w/ a spring XML and it loads the jersey spring servlet that i had to
make my own version which sets the application context of my apps spring XML
inside into that spring servlet so they use the same app context.
Any suggestions?
Thanks
--
View this message in context: http://jersey.576304.n2.nabble.com/objects-are-not-getting-garbage-collected-still-referenced-by-the-resource-tp5923768p5923768.html
Sent from the Jersey mailing list archive at Nabble.com.