public static synchronized void injectPools(ExecutorService globalThreadPool,ScheduledExecutorService scheduledThreadPool){
  if (globalThreadPool == null || scheduledThreadPool == null)   throw new IllegalArgumentException("thread pools must not be null");
  clearThreadPools();
  ActiveMQClient.globalThreadPool=globalThreadPool;
  ActiveMQClient.globalScheduledThreadPool=scheduledThreadPool;
  injectedPools=true;
}

public static synchronized void injectPools ( ExecutorService globalThreadPool , ScheduledExecutorService scheduledThreadPool ) { if ( globalThreadPool == null || scheduledThreadPool == null ) throw new IllegalArgumentException ( "thread pools must not be null" ) ; clearThreadPools ( ) ; ActiveMQClient . globalThreadPool = globalThreadPool ; ActiveMQClient . globalScheduledThreadPool = scheduledThreadPool ; injectedPools = true ; }
warning : this method has to be called before any clients or servers is started on the jvm otherwise previous serverlocator would be broken after this call .
