4 Replies Latest reply on Nov 7, 2008 7:16 PM by Andrew Rubinger

    PostContruct not being called

    Mohit Anchlia Novice

      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


      @LocalBinding (jndiBinding="queue/monitor")
      public class QueueMonitorTimerServiceBean implements QueueMonitorTimerService{
       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);
       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;
       public void timeout(Timer time){
       logger.info(" Timeout of Queue Monitor Timer Service ");
       public List<BlockingRule> getBlockingRules() {
       // TODO Auto-generated method stub
       return null;