import javax.ejb.Timeout;
import javax.ejb.Timer;
import javax.ejb.TimerService;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.ejb.TransactionManagement;
+import javax.ejb.TransactionManagementType;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
/**
*
*/
-@MessageDriven(mappedName = "jms/MythtvTimer")
+@MessageDriven(name = "TimerBean")
+// Spring's JTA transaction manager does not work with container managed transactions
+// because it uses the UserTransaction object which glassfish forbids.
+@TransactionManagement(TransactionManagementType.BEAN)
public class TimerBean implements MessageListener {
private static final Log LOG = LogFactory.getLog(TimerBean.class);
@Timeout
private void timeout(Timer aTimer) {
- LOG.debug("Timer expired!!!");
+ LOG.info("Timer expired!!!");
try {
DirectoryMonitor monitor = BeanKernel.getBeanFactory().find(
DirectoryMonitor.class);