Start background thread using spring on startup

In this tutorial we will start a thread on the application startup using spring bean.So we will start the thread using @PostConstruct annotation on the method. So this makes sure that the annotated method is called before the Spring bean is put into service.  And we will be using executor service to start a thread. … Read more

Properly Shutting down an ExecutorService

I was recently working on an application that used hibernate for db access and lucene for storing and searching text. This combination was really great. It made searching really fast. And tomcat was used as the application container.Sometimes I used to get this exception on redeploy: And also tomcat used to complain that it could … Read more