Using jboss 4.2. I have a simple Bean
but when I deploy it in jboss PostConstruct doesn't get called. Is that a bug? I can see that Bean in started state in JMX console though
---
@Stateless @Local @LocalBinding (jndiBinding="queue/monitor") public class QueueMonitorTimerServiceBean implements QueueMonitorTimerService{ @Resource javax.ejb.TimerService timerService; List<BlockingRule> blockingRules = null; private static final int REFERSH_TIMEOUT = 30 * 1000; private static final Log logger = LogFactory.getLog(QueueMonitorTimerServiceBean.class); @PostConstruct public void postConstruct(){ logger.info(" Initializing Queue Monitor Timer Service "); System.out.println("INIT QUEUE "); Timer timer = timerService.createTimer(REFERSH_TIMEOUT , "Blocking Rule Timer"); } public List<BlockingRule> getActiveBlockingRules() { // TODO Auto-generated method stub return blockingRules; } @Timeout public void timeout(Timer time){ logger.info(" Timeout of Queue Monitor Timer Service "); } public List<BlockingRule> getBlockingRules() { // TODO Auto-generated method stub return null; } }
Being discussed here http://www.jboss.com/index.html?module=bb&op=viewtopic&t=145248