public void run(ExecutorService executor,Runnable task){
  if (executor == null || task == null) {
    throw new IllegalStateException("Valid executor/task must be provided");
  }
  if (executor.isShutdown()) {
    throw new IllegalStateException("Stopped");
  }
  OperationContext origContext=OperationContext.getOperationContext();
  executor.execute(null);
}

public void run ( ExecutorService executor , Runnable task ) { if ( executor == null || task == null ) { throw new IllegalStateException ( "Valid executor/task must be provided" ) ; } if ( executor . isShutdown ( ) ) { throw new IllegalStateException ( "Stopped" ) ; } OperationContext origContext = OperationContext . getOperationContext ( ) ; executor . execute ( null ) ; }
executes the task using provided executor
