Hi, @Schedule is an EJB feature not a CDI one so @Alternative is not used here (so it sounds normal for me).
*Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/7/22 Reinis Vicups <[email protected]> > Hi, > > I have two implementations of some SchedulerWorkerManager: > > //ALTERNATIVE! > @Startup @Singleton @TransactionAttribute(**TransactionAttributeType.NOT_* > *SUPPORTED) @Lock(LockType.READ) @Alternative > public class AzureSchedulerWorkerManager implements SchedulerWorkerManager > { > @Override > @Schedule(second = "*/20", minute = "*", hour = "*", info = "Every 20 > seconds") > @Lock(LockType.WRITE) > public void manageSchedulerWorkers() {} > } > > AND > > //DEFAULT! > @Startup @Singleton @TransactionAttribute(**TransactionAttributeType.NOT_* > *SUPPORTED) @Lock(LockType.READ) @Default > public class BasicSchedulerWorkerManager implements SchedulerWorkerManager > { > @Override > @Schedule(second = "*/5", minute = "*", hour = "*", info = "Every 5 > seconds") > @Lock(LockType.WRITE) > public void manageSchedulerWorkers() {} > } > > I just noticed that despite AzureSchedulerWorkerManager is annotated as > being @Alternative it is still "ticking". > > Thank you, guys, for hints on how to configure them both properly. > > br > reinis >
