activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From czy11421 <czy11...@gmail.com>
Subject what is best practices to implement Multithread + JMS ?
Date Fri, 18 Sep 2009 19:11:18 GMT
what is best practices to implement Multithread + JMS ?

Let us assume we are listening financial market data feed. I have this 
coding like this:

class MyClass implements Listener{   

  private final ExecutorService pool = Executors.newFixedThreadPool(poolSize);  

   onMessage(...){
     pool.execute(new Handler(Message));    
    } 

  class Handler implements Runnable {
     public run(){
       // get data, same it into db
     }
   }
}

Anybody can share your experiences in this topic ?

Thanks.



Mime
View raw message