Results 1 to 3 of 3
  1. #1
    sky
    sky is offline Member
    Join Date
    Nov 2009
    Posts
    96
    Rep Power
    0

    Default How to interrupt threads blocked in a RMI operation

    Hi,

    I have some thread group blocked in some call to a remote method, and I would like to interrup them. Any suggestions? Thanks in advance.

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    Thread.interrupt()? However, that will cause exceptions on your connections, which is a problem if you want to keep the connections open.

    Look at setting timeouts on the RMI calls themselves, especially if they are waiting on a request. Then you can put the call in a loop and check a volatile instance flag.

  3. #3
    sky
    sky is offline Member
    Join Date
    Nov 2009
    Posts
    96
    Rep Power
    0

    Default

    I should mention that Thread.interrupt() is not working. Actually, I do want to close the conection, but it seems that I have to do it manually.

    PS. I could not found those timeout settings that you talk about.

Similar Threads

  1. XOR operation on bytes
    By divyanshu023 in forum New To Java
    Replies: 1
    Last Post: 09-17-2009, 08:11 PM
  2. Bit Wise operation: shifting
    By rueter in forum New To Java
    Replies: 1
    Last Post: 06-27-2009, 07:51 AM
  3. Anyone know how to interrupt a process forcibly?
    By 2potatocakes in forum Advanced Java
    Replies: 3
    Last Post: 04-05-2009, 07:29 PM
  4. blocked between server and clients
    By ibtehal in forum Networking
    Replies: 6
    Last Post: 07-17-2008, 01:30 AM
  5. Frame close operation
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-21-2007, 09:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •