Sometimes it can be usefull inject the Spring context in a legacy Servlet in order to automatically inject spring beans via @Autowired annotation. This can be easily done overriding the init method of HttpServlet and putting the statement SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this) in its implementation.

Read More →

Some Java EE applications may needs to schedule tasks in order to get notified at certain times (i.e. every other Thursday, but only after 10 am and before 2 pm). This should be done in a consistent manner, using either a cron expression, an interval, or a rate. There are several way to do this, from EJB timer service […]

Read More →