import java.io.Serializable;
import java.text.MessageFormat;
+import javax.jms.JMSException;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
return this.loggerBeanLocal;
}
+ /**
+ * Sends given message to configured queue
+ * <p>
+ * @param message Message to send
+ * @param messageProducer Message producer
+ * <p>
+ * @throws JMSException if something went wrong
+ */
+ protected void sendMessage (final ObjectMessage message, final MessageProducer messageProducer) throws JMSException {
+ // The parameter should be valid
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ }
+
+ // Send it
+ messageProducer.send(message);
+ }
+
}