4 Replies Latest reply on Jun 29, 2011 3:27 AM by 796440

    How To manipulate property in a Singleton Object.

      Hi Everyone,

      In my project we have a functionality where we have implemented a ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor) and we made this ThreadPool a singleton object. We have done this a singleton object because in real time scenario we will have to push task to the queue and process it. For this we can not create multiple instances of the Thread Pool and that's why it is singleton.

      Now, the issue is we need to change the pool size as well as the queue size dynamically. This should not involve any server restart. I heard about JMX which can take care of this things. We are using Websphere 6.1 as the App server. Could any one give me some idea how to achieve this. Either using JMX or in a normal way? Any links/books/post will be fine.

      Thank You.