Anyone know how to make @Schedule annotation work on JBoss AS 7?
I know that on Glassfish-3.1.2 it works out-of-box.
I try this:
@ManagedBean
@Stateless(name="ImportStatementSchedule")
public class ImportStatementSchedule implements Serializable{
private Logger _log = Logger.getLogger(this.getClass());
@Schedule(minute="*")
public void executeImport(){
_log.info("Scheduled task started");
}
}
I expect receive log message every minute, but nothing ;)
I checked these forum threads, but nothing helps :
https://community.jboss.org/message/623574
https://community.jboss.org/message/621893
https://community.jboss.org/message/637567
A have JBoss AS 7.1.1-Final
Maybe I forgot something, please can anyone point me to right way?
UPDATE:
I know that JBoss register my EJB to JNDI :
11:07:05,548 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named ImportStatementSchedule in deployment unit deployment "finadv.war" are as follows:
java:global/finadv/ImportStatementSchedule!finadv.bean.ImportStatementSchedule
java:app/finadv/ImportStatementSchedule!finadv.bean.ImportStatementSchedule
java:module/ImportStatementSchedule!finadv.bean.ImportStatementSchedule
java:global/finadv/ImportStatementSchedule
java:app/finadv/ImportStatementSchedule
java:module/ImportStatementSchedule
UPDATE2
It has been solved as mentioned in comments