]> git.mxchange.org Git - jcoreee.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Wed, 18 May 2016 07:34:11 +0000 (09:34 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 18 May 2016 07:34:11 +0000 (09:34 +0200)
- added trace messages
- added check on parameter for null

src/org/mxchange/jcoreee/database/BaseDatabaseBean.java

index 302daeb9e8be2365b0a9a36123ccd326c5295254..942f30f2def80b2060a3bc73e9db872fda1c16d1 100644 (file)
@@ -96,14 +96,23 @@ public abstract class BaseDatabaseBean implements Serializable {
         * @throws JMSException if something went wrong
         */
        protected void sendMessage (final ObjectMessage message, final MessageProducer messageProducer) throws JMSException {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("sendMessage: message={0},messageProducer={1} - CALLED!", message, messageProducer)); //NOI18N
+
                // The parameter should be valid
                if (null == message) {
                        // Throw NPE
                        throw new NullPointerException("message is null"); //NOI18N
+               } else if (null == messageProducer) {
+                       // Throw NPE again
+                       throw new NullPointerException("messageProvider is null"); //NOI18N
                }
 
                // Send it
                messageProducer.send(message);
+
+               // Trace message
+               this.getLoggerBeanLocal().logTrace("sendMessage: EXIT!"); //NOI18N
        }
 
 }