public void print(String temp) {
        System.out.println("sms: " + temp);
        try {

            Connection = ConnectionFactory.createConnection();
            session = Connection.createSession(false,
                    Session.AUTO_ACKNOWLEDGE);
            System.out.println("reach here");
            producer = session.createProducer(queue);

            message = session.createTextMessage();
            message.setText(temp);

            System.out.println("Sending: " + message.getText());
            producer.send(message);
            producer.close();
            Connection.close();
        } catch (Exception e) {
            System.err.println("SMS: Exception: "
                    + e.toString());
        }
    }