Jerome,
Thanks so much for your reply. I will look into the API docs for client
connectors and attempt to fix this problem in my codebase. Is there a
demonstration of this available on the web somewhere? It seems pretty
significant that it isn't cleaning itself up.

Thanks,
 - TK

... and they stirred up the Nazirites who had completed their days and they
cried aloud to Heaven, saying, "What shall we do with these? Where shall we
take them?"


On Fri, Jun 11, 2010 at 10:22 AM, jlouvel [via Restlet Discuss] <
[email protected]<ml-node%[email protected]>
> wrote:

> 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<http://www.restlet.org?by-user=t>
> Noelios Technologies ~ 
> http://www.noelios.com<http://www.noelios.com?by-user=t>
>
>
>
>
> -----Message d'origine-----
> De : TK Kocheran [mailto:[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5168906&i=0>]
>
> Envoyé : jeudi 10 juin 2010 21:13
> À : [hidden email] <http://user/SendEmail.jtp?type=node&node=5168906&i=1>
> 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<http://restlet-discuss.1400322.n2.nabble.com/Threads-never-close-for-ClientR?by-user=t>
> 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
>
>
> ------------------------------
>  View message @
> http://restlet-discuss.1400322.n2.nabble.com/Threads-never-close-for-ClientResource-tp5164847p5168906.html
> To unsubscribe from Threads never close for ClientResource, click 
> here<http://restlet-discuss.1400322.n2.nabble.com/subscriptions/Unsubscribe.jtp?code=cmZrcm9ja3RrQGdtYWlsLmNvbXw1MTY0ODQ3fDI3MzY0NDY4>.
>
>
>

-- 
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/Threads-never-close-for-ClientResource-tp5164847p5179149.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Reply via email to