package ve.gob.cnti.receiver.jms;

import java.util.logging.Logger;

import javax.jms.JMSException;
import javax.jms.MapMessage;

public class SenderJMS implements ISenderJMS {
	
	private static final Logger log = Logger.getLogger(SenderJMS.class.getName());
	

	IConnectionJMS connectionJMS=new ConnectionJMS();
    
    
    public SenderJMS(){
    	
    }
	@Override
	public  void sendActivitiesRegistry(MapMessage menssagesFrondEnd) {
		    
			log.info("Enviando el mensaje para el portal ciudadano");
			connectionJMS.openConnection(connectionJMS.getDEFAULT_USERS_ACTIVITIES_DESTINATION());			
			try {
				System.out.println("la cedula es "+menssagesFrondEnd.getString("cedula"));
			} catch (JMSException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			connectionJMS.setMapMessage(menssagesFrondEnd);			
		    connectionJMS.sendInfo();
		    connectionJMS.closeConection();
				
	}

	
}
