10 Replies Latest reply on Apr 25, 2006 2:45 AM by Tom Elrod

    Potential problem with thread usage in pingers and lease

    Tim Fox Master

      Looking at the code - I can see that connection pinger is implemented by creating a new java.util.Timer instance per Client on the client side, and using another java.util.Timer instance per connection on the server side.

      Each java.util.Timer instance has it's own thread.

      I'm worried that this is not going to scale.

      Thousands of connections on the server will mean thousands of threads.

      Same on the client side.

      I know JBossMQ has issues with too many threads and I'd really like to avoid making the same mistakes in messaging if at all possible.

      How hard would it be to change it so the same Timer (or a limited number of Timers) were used to co-ordinate the pinging and server lease functionality for multiple connections?