//package lu.tudor.santec.gecamed.agenda.ejb.mdb.beans;
//
//import java.util.Calendar;
//import java.util.GregorianCalendar;
//
//import javax.ejb.ActivationConfigProperty;
//import javax.ejb.EJB;
//import javax.ejb.MessageDriven;
//import javax.jms.Message;
//import javax.jms.MessageListener;
//import javax.jms.TextMessage;
//
//import org.apache.log4j.Level;
//import org.apache.log4j.Logger;
//
//import lu.tudor.santec.gecamed.agenda.ejb.session.beans.SMSSendingBean;
//import lu.tudor.santec.gecamed.agenda.ejb.session.interfaces.SMSSendingInterface;
//import lu.tudor.santec.gecamed.agenda.utils.AgendaAdminSettingsConstants;
//import lu.tudor.santec.gecamed.core.schedulable.GECAMedHeartbeatPoster;
//
//
///*
//@MessageDriven(activationConfig =
//{
//  @ActivationConfigProperty(propertyName = "destinationType", 	propertyValue="javax.jms.Topic"),
//  @ActivationConfigProperty(propertyName = "destination",		    propertyValue=GECAMedHeartbeatPoster.HeartbeatTopic),
//  @ActivationConfigProperty(propertyName = "acknowledgeMode", 	propertyValue = "AUTO_ACKNOWLEDGE"),
//  @ActivationConfigProperty(propertyName = "maxSession", 		propertyValue = "1")
// })*/
//public class SMSSendingSchedulerBean implements MessageListener{
//
//	private boolean isrunning;
//	@EJB(name="SMSSendingBean",beanInterface=SMSSendingInterface.class, beanName="SMSSendingBean")
//   	SMSSendingInterface smsBean;
//	private static Logger logger = Logger.getLogger(SMSSendingSchedulerBean.class.getName());
//	
//	public void onMessage(Message msg) {
//		
//		
//			    
//				try	{
//					if (msg instanceof TextMessage) 	{		
//					//	TextMessage textMessage = (TextMessage) msg;
//						
//						//Uncomment to use SMSGateway
//					//	smsBean.sendReminders();
//					}
//				}
//				catch (Exception p_Exception){
//					logger.log(Level.FATAL, "Failed to process received message",p_Exception);
//				}
//				
//			   
//			     
//			     /* ================================================== */
//	}
//    
//
//}