While trying to completely undeploy my EJB (see this topic: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=114251 ) I decided to try and track the creation and the destruction of my EJB3 Stateless Bean.
In order to do so, I implemented my methods the following way:
@PostConstruct public void postConstruct() { logger.info("PostConstruct, MonitoringEngineBean is alive."); } @PreDestroy public void preDestroy() { logger.info("PreDestroy, we release the LogFactory."); LogFactory.release(MonitoringEngineBean.class.getClassLoader()); }