Hi TK,

Client connectors automatically created by the ClientResource are now
automatically stopped upon garbage collection to prevent dormant threads.

Another wait to prevent this is to manually create the Client connector
instance and to set it on each created ClientResource via setNext().

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com




-----Message d'origine-----
De : TK Kocheran [mailto:[email protected]] 
Envoyé : jeudi 10 juin 2010 21:13
À : [email protected]
Objet : Threads never close for ClientResource

I have a big problem in a project I'm working on currently. I am using
Restlet 2.0 SNAPSHOT with JAXRS and JAXB. I am creating client resources
inside of a method (so they'll be immediately cleaned up when the method
finishes executing), but the thread(s) they generate are never being closed.
Thus, I have a thread leak that looks like this:
http://i50.tinypic.com/2jg5eli.jpg . Basically, they never close and cause
memory and thread usage to quickly get out of control.

I am using a wrapper class to interface with the ClientResource objects, the
class looks like this: http://pastebin.com/FyW24p2u

My method code essentially looks like this: http://pastebin.com/Xwp15RnR

I do need to keep my client resources as method level variables and not
members of a class, since I need things to work across multiple threads. 

Can anyone help me figure out what I'm doing wrong, or if this is a bug in
Restlet?
-- 
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Threads-never-close-for-ClientR
esource-tp5164847p5164847.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=26193
11

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2619804

Reply via email to