Tuesday, December 6, 2011

Oracle Certified Master, Java EE 5 Enterprise Architect OCMJEA (SCEA5) part1 passed

On 29 October 2011 I passed OCMJEA part 1, it was quite tricky exam but I enjoy it and everything went fine, I also completed required hands on training and subscribed for part 2 assignment which I must complete until may 2012.
I'm very happy now:).

Using thread pool starting from java5

import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;

/**
* Processing jobs thread pool
*/
public class ProcessingJobExecutorService {
private static ProcessingJobExecutorService _instance =null;
private ExecutorService executorService;

private ProcessingJobExecutorService(){
executorService = new ScheduledThreadPoolExecutor(500);
}

public static ProcessingJobExecutorService getInstance(){
if(_instance==null){
_instance=new ProcessingJobExecutorService();
}
return _instance;
}
public void execute (Runnable r){
executorService.execute(r);

}

}