deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tvori Kod <tvori....@gmail.com>
Subject Using @Scheduled with nested class throws InstantiationException
Date Thu, 30 Oct 2014 21:54:36 GMT
Hi,

CustomJob is a nested class  annotated with @Scheduled inside in class
annotated with @ApplicationScoped and @Named


@Named("appBean")
@ApplicationScoped
public class ApplicationBean implements Serializable {


@Scheduled(cronExpression = "0/5 * * * * ?")
    public class CustomJob implements Job {

        public CustomJob() {}

        @Override
        public void execute(JobExecutionContext context) throws
JobExecutionException {
            System.out.println(System.currentTimeMillis());
        }
    }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message