ThreadPoolExecutor- Thread termination

I created a thread pool executor and submitted some callable tasks to thread pool and waiting on future object in the method futureobject.get(timeout, TimeUnit.SECONDS).
Once it is timed out i am catching the TimeoutException and cancelling the task through future.cancel(ture),
But it is just interrupting the thread and not cancelling the task if the task has already started executing.
Is there any way to stop the future Object task after a certain time out irrespective of its current state?
I want to terminate the thread execution and make the thread pick another task once if it is timed out.
One way is to interrupt the thread which is handling the future object task and then stop the thread.
Is there any other way that I can cancel a future Object task directly without dealing with the thread handling this future object task.
Can you throw a light on this. Any idea would be helpful...!!
Thanks in advance.

Thanks Peter for your reply.
But the problem is the thread is not like executing in a while loop to test every time whether it is interrupted or not by future.cancel(ture).
As my callable task is calling internally more methods which are call some more methods of other classes in this i cant put every where this logic to check whether thread is interrupted or not.
Even i have done that my concern is what if thread is executing a method long time because of some blocking problem. i need to wait the control comes back after method to check whether thread is interrupted or not. which is not desired..
let me put in an example.
public Object call(){
new ArrayList list=SampleClass1Object.readData();
// check whether thread is interrupt by future.cancel() method
Object ob= SampleClass2Object.display(list);
return ob;
If i fix time in future.get(timeout,TimeUnit). when the time out is happend the thread executing the method readData() it wont reflect immediately once this readData() method is completed then only it will check whether the thread is interrupted or not. This what is happening right now in my case.

Similar Messages

  • Is the ThreadpoolExecutor thread safe?

    Is the ThreadpoolExecutor thread safe? Is it safe to use a ThreadpoolExecutor from a multiple thread contexts?

    If the API documentation says it's thread-safe, then it is. Otherwise you must assume it is not.

  • [Solved][Boost] Condition_variable exception on thread termination

    Hi folks,
    I'm trying to implement an object that accepts some data and processes it in a separate thread (basically producer-consumer model). The object's thread should run until object destructor is called. To notify of new data I use condition_variable. The most important part of code (full here: http://pastebin.com/uEtU0KG1 , with irrelevant parts simplified) :
    std::queue<std::string> msgs;
    boost::mutex read_write_queue;
    bool finish;
    boost::condition_variable new_msgs;
    void thread_func()
    std::string m;
    while(true) // !!!
    { // lock begins
    boost::unique_lock<boost::mutex> lk(read_write_queue);
    while(msgs.empty())
    new_msgs.wait(lk);
    if(finish) // to be called on object destruction
    lk.unlock();
    return;
    m = msgs.front();
    msgs.pop();
    } // end of lock
    std::cout << m << "\n"; // some processing of data
    The problem is following: on object destruction (at the end of main()) getting an error that condition_variable couldn't cleanly terminate:
    a.out: /usr/include/boost/thread/pthread/condition_variable_fwd.hpp:46: boost::condition_variable::~condition_variable(): Assertion `!pthread_mutex_destroy(&internal_mutex)' failed.
    When the line marked with 3 bangs (start of while cycle) is commented out, as if the object receives only one message, everything is ok. Have thought and googled about it a lot, but without any success.
    I would be very grateful if someone would point at the fault (guess it's something simple).
    Last edited by yl3dy (2011-11-13 09:21:48)

    Well, I've finally figured out what was wrong. As I thought, the reason is quite simple. Destructor of an object didn't wait until thread will do all the termination things (unlocking condition variable, check for finish state and calling return). Adding a.join() at the end of destructor function will do the job.
    What a stupid mistake.

  • How display a message before thread termination

    Hi,
    i want to display a message before the thread completes its work or
    before i destroy it..
    please help me.........

    bhuvanavijayam wrote:
    I have a main class which extends JFrame, in the main class i created an object and started a thread.
    If i close the GUI(JFrame), the thread is also being closed.
    so, before that thread going to be terminated, i want to store some info...
    how to do that.Please start a new thread in the future. It's OK to provide a link to an old thread that you found (like this one), but please don't resurrect dead threads.
    In addition to what Peter suggested, who's forcing you to use the EXIT_ON_CLOSE constant for setDefaultCloseOperation()? If that wasn't explicitly by you or somebody else, closing the JFrame wouldn't be exiting the application in the first place, it would be hiding the Window.

  • TestStand Sequence Thread Termination

    I have created a Sequence which launches a VI to run in a parallel/background thread. This sequence gets called in my Main Sequence. In my Main Sequence, I'm trying to figure out how to terminate the background thread after the main sequence has completed all of its actions. The background thread has no pass/fail criteria, its is essentially a polling VI which is supposed to share a Queue which contains data telling the VI what to do.
    Before trying to implement this into Teststand, I successfully created an application which launches a background VI using VI server. Using Queues, I'm able to terminate and pass data to the VI running in the background from the Main VI. I'm essentially using the same approach in Teststand with no success in being able to terminate the parallel thread. Can parallel threads use the same Queue reference?
    Thanks
    Peter.

    Hi Buzz,
    Here's an example I was using awhile back to demonstate a problem. But it might help you in your solution.
    The example starts a dialog panel in a new execution. The MainSequence carries on and does something else.
    The user has the option to press the button on the dialog to close the new execution, or the mainsequence will come to an end then terminates the new execution.
    Hope it helps
    Regards
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    StopNewExecution.seq ‏41 KB

  • ThreadPoolExecutor - thread creation madness

    Hi all,
    I am trying to use a Thread Pool for a task server. My testing involves running 10 concurrent jobs that each serially call the server 100 times.
    The maximum load on the server (for this test) is therefore 10 tasks at any given point in time. The Thread Pool is creating between 50 and 100 threads to process these tasks. I sent all morning looking at the source and cannot figure out why these threads are being created. Existing threads should be re-used.
    The pool is created with 5 core, 100 max threads, 60sec lifetime and a task Q of 5.
    The server simply listens to a port (Socket) and calls .execute when a task arrives.
    Any ideas why so many threads are being created ?
    Thanks,
    Craig.

    Here are stats from a run with Core=10, Max=50, Lifetime=60 and Q=6.
    The maximum number of threads was reached and tasks were rejected. As per previous post, there was a maximum of 10 concurrent tasks at any given point in time (see Max Act column).
    Thread Summary
      Max Act (max number of active threads), Max Q (max tasks in Q),
      Min/Max PlSz (min/max pool size) are all taken from snapshots while the
      reported thread was executing a task.
                                                        Times  Max  Max Min  Max   1st   Last
    Thread  First Used           Last Used               Used  Act   Q  PlSz PlSz  Task  Task
        12  2007-07-18 14:36:29  2007-07-18 14:37:19       24   10    0   10   50    11   963
        13  2007-07-18 14:36:29  2007-07-18 14:37:20       25   10    0   10   50    12   970
        14  2007-07-18 14:36:28  2007-07-18 14:37:19       25   10    0   10   50     3   956
        15  2007-07-18 14:36:29  2007-07-18 14:37:20       26   10    0   10   50     4   983
        16  2007-07-18 14:36:29  2007-07-18 14:37:23       26   10    0   10   50     5  1002
        17  2007-07-18 14:36:29  2007-07-18 14:37:19       25   10    0   10   50     6   962
        18  2007-07-18 14:36:29  2007-07-18 14:37:21       25   10    0   10   50     7   991
        19  2007-07-18 14:36:29  2007-07-18 14:37:20       25   10    0   10   50     8   965
        20  2007-07-18 14:36:29  2007-07-18 14:37:20       27   10    0   10   50     9   975
        21  2007-07-18 14:36:29  2007-07-18 14:37:22       26   10    0   10   50    10  1000
        22  2007-07-18 14:36:31  2007-07-18 14:37:25       24   10    0   11   50    32  1007
        23  2007-07-18 14:36:32  2007-07-18 14:37:20       22   10    0   16   50    46   978
        24  2007-07-18 14:36:32  2007-07-18 14:37:20       21   10    0   16   50    47   977
        25  2007-07-18 14:36:32  2007-07-18 14:37:20       22   10    0   16   50    48   973
        26  2007-07-18 14:36:32  2007-07-18 14:37:20       22   10    0   16   50    49   980
        27  2007-07-18 14:36:32  2007-07-18 14:37:21       24    9    3   16   50    50   992
        28  2007-07-18 14:36:34  2007-07-18 14:37:20       20   10    0   18   50    76   968
        29  2007-07-18 14:36:34  2007-07-18 14:37:21       20   10    0   18   50    77   989
        30  2007-07-18 14:36:34  2007-07-18 14:37:20       18   10    0   20   50    91   976
        31  2007-07-18 14:36:34  2007-07-18 14:37:19       19    9    0   20   50    92   959
        32  2007-07-18 14:36:35  2007-07-18 14:37:22       19   10    0   22   50   103   995
        33  2007-07-18 14:36:35  2007-07-18 14:37:21       19   10    0   22   50   104   984
        34  2007-07-18 14:36:37  2007-07-18 14:37:24       18   10    0   23   50   129  1005
        35  2007-07-18 14:36:38  2007-07-18 14:37:21       15    9    0   27   50   162   993
        36  2007-07-18 14:36:38  2007-07-18 14:37:24       18   10    1   27   50   163  1004
        37  2007-07-18 14:36:38  2007-07-18 14:37:24       16   10    0   27   50   164  1006
        38  2007-07-18 14:36:38  2007-07-18 14:37:20       16   10    0   27   50   166   967
        39  2007-07-18 14:36:39  2007-07-18 14:37:20       16   10    0   32   50   176   982
        40  2007-07-18 14:36:39  2007-07-18 14:37:21       16    9    0   32   50   177   988
        41  2007-07-18 14:36:39  2007-07-18 14:37:20       16   10    0   32   50   178   971
        42  2007-07-18 14:36:39  2007-07-18 14:37:21       16   10    0   32   50   179   987
        43  2007-07-18 14:36:39  2007-07-18 14:37:20       16   10    0   32   50   180   981
        44  2007-07-18 14:36:40  2007-07-18 14:37:19       15    9    0   33   50   188   960
        45  2007-07-18 14:36:42  2007-07-18 14:37:21       14   10    0   37   50   222   990
        46  2007-07-18 14:36:42  2007-07-18 14:37:23       15    9    0   37   50   223  1003
        47  2007-07-18 14:36:42  2007-07-18 14:37:22       15   10    1   37   50   225   998
        48  2007-07-18 14:36:42  2007-07-18 14:37:23       14   10    0   37   50   226  1001
        49  2007-07-18 14:36:43  2007-07-18 14:37:19       14    9    0   40   50   237   961
        50  2007-07-18 14:36:43  2007-07-18 14:37:20       15    9    1   40   50   240   974
        51  2007-07-18 14:36:43  2007-07-18 14:37:20       13    8    0   40   50   241   972
        52  2007-07-18 14:36:44  2007-07-18 14:37:22       15   10    3   41   50   258   996
        53  2007-07-18 14:36:45  2007-07-18 14:37:19       13   10    0   44   50   268   958
        54  2007-07-18 14:36:45  2007-07-18 14:37:19       13   10    0   44   50   271   957
        55  2007-07-18 14:36:45  2007-07-18 14:37:20       13    9    0   44   50   272   969
        56  2007-07-18 14:36:45  2007-07-18 14:37:20       14   10    0   45   50   282   979
        57  2007-07-18 14:36:46  2007-07-18 14:37:21       13    8    0   47   50   290   985
        58  2007-07-18 14:36:46  2007-07-18 14:37:20       11    7    0   47   50   291   966
        59  2007-07-18 14:36:47  2007-07-18 14:37:21       13   10    0   49   50   303   986
        60  2007-07-18 14:36:47  2007-07-18 14:37:22       14   10    1   49   50   304   997
        61  2007-07-18 14:36:47  2007-07-18 14:37:19       12   10    0   50   50   316   950
    Maximum size pool reached was 50
    *** End of Report ***

  • How to migrate util.concurrent PooledExecutor|ThreadPoolExecutor.workerDone

    The PooledExecutor of the old util.concurrent framework had a method
       * Cleanup method called upon termination of worker thread.
      protected synchronized void workerDone(Worker w) {
    ...  }In the new ThreadPoolExecutor this method is private. In my child class of PooledExecutor / ThreadPoolExecutor I need to redefine it. How can I do this?
    My problem is: I am working with IBM WebSphere MQ (=MQSeries) Sessions. An MQ Session can only be deleted by the thread that has created it.
    I would be grateful for your Help!

    Define your own implementation of ThreadFactory that creates a new thread with a try/finally clause such that the code you want to execute on the threads termination is executed in the finally clause. If you still want to leverage the Executors thread factories, simply embed the provided Runnable inside another runnable that sets up the try/finally and calls the provided Runnable's run() method inside its try block.
    Should suit your needs nicely.

  • Thread pool executor problem

    When using a thread pool executor (java.util.concurrent.ThreadPoolExecutor) to limit the number of threads executing at a time, the number of threads running still exceeds the limit number.
    This is the code:
    private ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(2, 3, 20, TimeUnit.SECONDS, new LinkedBlockingQueue());
    The number of tasks in my program are 4, so i always have 4 threads running, although i limited it to 3.
    Can anyone help me with this problem? Or can u propose another solution to limit the number of running threads? By the way, i also tried using a newFixedThreadPool() and got the same problem.
    Thx.

    The number of tasks in my program are 4, so i always
    have 4 threads running, although i limited it to 3.How do you know that there are 4 threads running? If you're generating a JVM thread dump, you're going to see threads that are used internally by the JVM.
    Here's a simple program that creates a fixed-size threadpool and runs jobs. It limits the number of concurrent threads to 3. Compare it to what you're doing, I'm sure that you'll find something different. Also, verify that you're not creating threads somewhere else in your program; all of the ThreadPoolExecutor threads will have names of the form "pool-X-thread-Y"
    import java.util.concurrent.Executors;
    import java.util.concurrent.ExecutorService;
    public class ThreadPoolTest {
        public static void main(String[] args) {
            ExecutorService pool = Executors.newFixedThreadPool(3);
            for (int ii = 0 ; ii < 10 ; ii++) {
                pool.execute(new MyRunnable());
            pool.shutdown();
        private static class MyRunnable implements Runnable {
            public void run() {
                log("running");
                try {
                    Thread.sleep(1000L);
                catch (InterruptedException e) {
                    log("interrupted");
            private void log(String msg) {
                System.err.println(
                        msg + " on " + Thread.currentThread().getName()
                        + " at " + System.currentTimeMillis());
    }

  • Thread Pool - EMS

    Hi,
    How can I increase the number of threads of an EMS (Enterprise Manager Source)?
    We define a JMS Queue and I only see there are only 5 consumers.. The processing of the messages from the queue are two slow..
    Thanks in advance,
    Julian

    The number of tasks in my program are 4, so i always
    have 4 threads running, although i limited it to 3.How do you know that there are 4 threads running? If you're generating a JVM thread dump, you're going to see threads that are used internally by the JVM.
    Here's a simple program that creates a fixed-size threadpool and runs jobs. It limits the number of concurrent threads to 3. Compare it to what you're doing, I'm sure that you'll find something different. Also, verify that you're not creating threads somewhere else in your program; all of the ThreadPoolExecutor threads will have names of the form "pool-X-thread-Y"
    import java.util.concurrent.Executors;
    import java.util.concurrent.ExecutorService;
    public class ThreadPoolTest {
        public static void main(String[] args) {
            ExecutorService pool = Executors.newFixedThreadPool(3);
            for (int ii = 0 ; ii < 10 ; ii++) {
                pool.execute(new MyRunnable());
            pool.shutdown();
        private static class MyRunnable implements Runnable {
            public void run() {
                log("running");
                try {
                    Thread.sleep(1000L);
                catch (InterruptedException e) {
                    log("interrupted");
            private void log(String msg) {
                System.err.println(
                        msg + " on " + Thread.currentThread().getName()
                        + " at " + System.currentTimeMillis());
    }

  • Sun Access Manager causes threads leak in glassfish

    Hello,
    I have integrated SUN AM with glassfish as basic authentication module for Web Services invocation.
    Server is running CentOS, JVM 1.6 64bit, SUN AM 7.1 and glassfish 2.1.1.
    The problem is that each request (rejected or accepted) causes creating 6 threads that will never be terminated. This causes running out of memory after about a thousand request. (I'm using visualvm for monitoring JVM)
    Session timeouts are set, but it doesn't imply threads termination.
    Do you have any hints what can be the problem? of course I'll send more details if you need it.
    Best Regards,
    Lukasz

    The information you provided isn't enough to troubleshoot your problems. You will need to enable debug logs to get more detailed error messages. My guess would be that the password for the dsameuser has expired and/or the dsameuser has been locked/disabled
    Edited by: handat on Sep 19, 2012 2:32 PM

  • Stopping a thread from running

    Hai
         I am new to java. It would be helpful for me if someone helps me out in doing this.
         Actually in my program ,I should
    i. Find out whether a particular file exists in the given directory or not.
    ii. If the file doesn't exist, my program should wait for certain timeframe and check for the same file again.
    iii. If the program cannot find the required file within the timeout specified, my application should exit.
         I have done (i) and (ii) using threads. But in the case of (iii), I came to know that stop() method is depricated.
         I am providing my code for a better understanding. Could you please let me know, what would be the best way to stop the thread from running after the timeout is reached in my program?
    Thanx in advance
    import java.io.File;
    public class Fileexists implements Runnable
    static Thread t;
    public static void main(String[] args)
         System.out.println("creation of object");     
         FileExists test = new FileExists();
         t = new Thread(test);
         t.start();
    // run method
    public void run()
         File f = new File("searchfile.txt");
         boolean b = f.exists();
    System.out.println();
    if(b == false)
    System.out.println("Required file doesnot exists");
    try
         t.sleep(20000);
    catch (InterruptedException e)
         // TODO Auto-generated catch block
         e.printStackTrace();
              t.run();
    else
    System.out.println("Required file found");
    } // end of run()
    } // end of FileExists class

    Actually your use of threads is a difference which makes no difference. The JVM starts an initial thread and runs your main(), at the end of which you start a thread and return. So you've just replaced one thread with another. There's no parallel processing.
    The t.run() at the end of your run() method won't work. A particular Thread object can only run once. It will give you an IllegalStateException.
    I can't see how multi-threading will help you with this task at all, all you need is a simple loop with a Thread.sleep in it.
    If you really want to use a separate thread or Timer to implement a timeout (as an exercise) then use Thread.interrupt() to wind up a thread. The looping thread should test with Thread.interrupted() in it's loop condition, if it's in sleep() when interrupted an InterruptedException will be thrown which you should catch and allow to break the loop and let the thread terminate.
    So your loop structure looks like:
    try {
    while(!Thread.interrupted()) {
        ...  do your test
        Thread.sleep(.....);
      System.out.println("Thread terminated by detecting interrupted");
      } catch(InterruptedException ex)  {
         System.out.println("Thread interrupted from sleep");
    You can get the Thread for the main thread simply by storing Thread.currentThread() in a Thread reference.
    I'd suggest using a java.util.Timer to launch your time-out and leave the loop on the main thread started by the JVM.

  • Thread IMMEDIATE stopping

    Hi,
    Here's my problem : I'm building a Command station that has to be able to start an execution Thread and also to stop it immediately (a.k.a PANIC BUTTON) No problem with starting the Thread, but the problem is with the stopping. The thread i'm starting achieves native calls on an embedded system with the use of JNI, so I can't implement changes directly in the native code to respond to interrupts.
    I have to specify that the run( ) method of my Thread does NOT contain a while statement, in fact there is only ONE CALL, for example :
    public void run( ) { embedded_system.flashLEDForAnHour(); }
    So if anyone has an idea about a solution or a hint for a solution, I would be very grateful because I've been searching for days!
    greetings,
    Peter

    A solution to what? If you have to specify that,
    specify it. Write it in your API documents. But I
    don't see why you would have to specify such a thing,
    or even what would be the point of specifying it.
    After all, that flashLEDForAnHour method could contain
    any code at all, couldn't it? Including
    while-statements?
    What about for-statements? Are they allowed? Because
    any while-statement can be rewritten as a
    for-statement.I think he just means his actual thread is just invoking a long-running method which he can't change (3rd-party method). There's not a real solution to this problem. If the long-running method has no "get outta here now" technique, you're stuck with calling thread.stop(), which is of course an abnormal thread termination (and hence why it's deprecated) as it will/may not properly clean up, just like abnormally killing a long-running app.

  • Thread is not dying

    public t() {
         mytable = new myTable(day,hour,minute,show,toggleTime);     
         table = mytable.getTable();
    public class myTable{
    myTable(Vector day, Vector hour,Vector minute,Vector show,long toggle_Time) {
    createTableLayout(day,hour,minute,show);     
         this.toggleTime=toggle_Time;//in milly second
    public JTable getTable() {
    return table;
    private JComboBox createComboBox(Vector colVector)
         JComboBox comboBox = new JComboBox(colVector);     
         comboBox.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e) {
              startThread();
         return comboBox;
    private void startThread()
         if(this.thread !=null)
              try{
              this.thread.stop();
              this.thread.join();          
              thread=null;
              s.stop();
              }catch(java.lang.InterruptedException iexp)
                   System.out.println("From myTable:"+iexp);
         s=new selectURLToDisplay(table,toggleTime);
         threadFromSelect=s.getThread();
         thread=new Thread(s);
         thread.start();     
    class selectURLToDisplay implements Runnable { 
    public void run() {
         readTableData();
         running= true;                    
         return;
    If I change the value in the combobox of the table it creates a thread with the new table data. But it can't stop the previous Thread .. Any idea .
    please help.

    Thread termination is a [very] frequently discussed topic, answered numerous times in this forum -- why don't you do a search?
    Briefly, threads need to cooperate in order to do graceful interruption and joining. Thread.stop() is not the correct approach to the problem.

  • URG & IMP: How does one stop the Thread.currentThread?

    hi,
    I want to stop the current thread.
    Presently teh code used Thread.currentThread.stop()
    However stop() has been deprecated
    Thread.currentThread.interrupt() doesnot seem to help.
    If I try Thread.currentThread.isAlive() post tehinterrupt, it doesnot work as desired and teh thread is still active...
    Any pointers????
    We have alreday tried using the boolean volatile varible to stop the thread as recommended by sun and since this is the currentThread, it cannot be assigned to null.
    Thanks
    Priya

    hi,
    I want to stop the current thread.
    Presently teh code used Thread.currentThread.stop()Whyever would a thread want to deliver a stop() to itself.
    Did you mean that you wanted to stop() a different thread?
    As indicated in the (depreaction) documentation for stop(), using interrupt()
    is a better idea. However, that requires you to have a protocol
    where the receiver of the interrupt then reacts in an appropriate
    manner, i.e. interrupt() can be the basis for cooperative
    thread termination; it can't merely replace a stop() call
    in an existing application without any other changes.
    >
    However stop() has been deprecated
    Thread.currentThread.interrupt() doesnot seem to
    help.
    If I try Thread.currentThread.isAlive() post
    tehinterrupt, it doesnot work as desired and teh
    thread is still active...
    Any pointers????
    We have alreday tried using the boolean volatile
    varible to stop the thread as recommended by sun and
    since this is the currentThread, it cannot be
    assigned to null.Think about what you are trying to achieve. Did you want
    to just do a Throw() out of the current method, with (or
    without )a corresponding Catch() in some outer context)
    so that the you can unwind in case of an exceptional
    condition and have the thread exit?
    >
    Thanks
    Priya

  • Detecting (And Killing) Abandoned Threads

    Hi All,
    I'm going to try to make my question as simple as possible: I'm trying to use the service guardian to automatically detect an abandoned thread and kill the originating process. So basically I set up a test that ends up with an abandoned thread and configured service Guardian... but it didn't work :D
    What I first did is setting the guardian's timeout to be very short (6 seconds). When I do that, what I get is:
    2010-03-26 10:03:29.389/0.859 Oracle Coherence GE 3.5.3/465 <Info> (thread=main, member=n/a): Loaded cache configuration from "file:/C:/workspaces/POC/InvocableTest/bin/coherence-cache-config.xml"
    2010-03-26 10:03:29.952/1.422 Oracle Coherence GE 3.5.3/465 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
    2010-03-26 10:03:35.295/6.765 Oracle Coherence GE 3.5.3/465 <Error> (thread=Cluster, member=n/a): Attempting recovery (due to soft timeout) of Guard{Daemon=TcpRingListener}
    2010-03-26 10:03:35.904/7.374 Oracle Coherence GE 3.5.3/465 <Error> (thread=Cluster, member=n/a): Terminating guarded execution (due to hard timeout) of Guard{Daemon=TcpRingListener}
    Coherence <Error>: Halting JVM due to unrecoverable service failure
    2010-03-26 10:03:36.904/8.374 Oracle Coherence GE 3.5.3/465 <Error> (thread=Termination Thread, member=n/a): Full Thread Dump
    ThreadCluster
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onWait(Grid.CDB:6)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Unknown Source)
    So that's before the thread gets abandoned... it seems that it detects a deadlock when starting coherence. But that's ok, I know the service guardian is working. The problem comes when I set the timeout to something more realistic: 35 seconds for instance. I run my test, the thread gets to an abandoned state and the service guardian does not see it :(
    Any Ideas?
    h4. My override config is:
    <coherence>
    <cluster-config>
         <service-guardian>
              <timeout-milliseconds system-property="tangosol.coherence.guard.timeout">6000</timeout-milliseconds>
              <service-failure-policy>exit-process</service-failure-policy>
         </service-guardian>
    </cluster-config>
    <logging-config>
    <severity-level system-property="tangosol.coherence.log.level">5</severity-level>
    <character-limit system-property="tangosol.coherence.log.limit">0</character-limit>
    </logging-config>
    </coherence>
    Thanks!
    Fernando
    Edited by: ZeoS on Mar 26, 2010 7:13 AM

    it's an Invovable running on the server.
    The description in the debugger is: InvocationServiceWorker
    Maybe this helps:
    10-03-26 12:03:41.279/72.663 Oracle Coherence GE 3.5.3/465 <Error> (thread=Abandon, member=1): A worker thread "InvocationServiceWorker:0 executing task "Message "InvocationRequest"
    FromMember=Member(Id=1, Timestamp=2010-03-26 12:02:29.866, Address=10.31.106.86:8088, MachineId=32598, Location=site:someSite.com,machine:ZeoSWorkStation,process:1084, Role=TestInvocableExpiration)
    FromMessageId=0
    Internal=false
    MessagePartCount=0
    PendingCount=0
    MessageType=1
    ToPollId=0
    Poll=null
    Packets
    Service=InvocationService{Name=InvocationService, State=(SERVICE_STARTED), Id=3, Version=3.1, OldestMemberId=1}
    ToMemberSet=MemberSet(Size=1, BitSetCount=2, ids=[1])
    NotifySent=false
    InvocationRequest{Query, Task=TestInvocableExpiration.SocketInvocable@16b352c}
    }", did not respond to 8 interrupt requests. The execution was canceled. The thread is abandoned...
    Fernando

Maybe you are looking for