thread safety - how to cancel XmlRpcClient.execute before timeout (java) -


i'm programming in java , using xml-rpc submit data client server. problem when xmlrpcclient.execute code whenever have connection error, application gets stuck until timeout exception (which want). placed whole process in new thread , wanted ability stop/cancel process if didn't want wait timeout.

i learned how stop threads idk if can interrupt xmlrpcclient.execute code.

any ideas?

the default execute method is, nature, synchronous, is, blocking. if using jakarta commons httpclient, set socket timeout shorter value (the default 0 meaning no timeout) transport's setconnectiontimeout method. believe, though, proper handling use executeasync method , providing callback in order continue.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -