4 Replies Latest reply: Jun 28, 2011 10:27 PM by 796440 RSS

    How To manipulate property in a Singleton Object.

    786298
      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.