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;
| }
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187571#4187571
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4187571
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user