Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-09-16 16:32:48 -0400
committerRyan D. Brooks2010-09-16 16:32:48 -0400
commitf0f991b4f728f2e7550016da91eb2e8d2c8c750c (patch)
tree7ad402016cbf8810f6f6ffe43c3a7dccab95f402 /plugins/org.eclipse.osee.framework.messaging
parent445b78e7fdb5067609dd91f8b348ea91313ecedc (diff)
downloadorg.eclipse.osee-f0f991b4f728f2e7550016da91eb2e8d2c8c750c.tar.gz
org.eclipse.osee-f0f991b4f728f2e7550016da91eb2e8d2c8c750c.tar.xz
org.eclipse.osee-f0f991b4f728f2e7550016da91eb2e8d2c8c750c.zip
refactor: Utilize utility method OseeExceptions.wrapAndThrow instead of in-place code
Diffstat (limited to 'plugins/org.eclipse.osee.framework.messaging')
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java13
-rw-r--r--plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ReplyConnectionActiveMqImpl.java4
2 files changed, 6 insertions, 11 deletions
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java
index 7ddc606e7b..943164941c 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java
@@ -19,7 +19,6 @@ import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.logging.Level;
-
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.ExceptionListener;
@@ -31,10 +30,9 @@ import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TemporaryTopic;
import javax.jms.Topic;
-
import org.apache.activemq.ActiveMQConnectionFactory;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeWrappedException;
+import org.eclipse.osee.framework.core.exception.OseeExceptions;
import org.eclipse.osee.framework.jdk.core.type.CompositeKeyHashMap;
import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -101,7 +99,7 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi
connection.start();
started = true;
} catch (Throwable ex) {
- throw new OseeWrappedException(ex);
+ OseeExceptions.wrapAndThrow(ex);
}
}
@@ -130,12 +128,9 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi
// OseeLog.log(Activator.class, Level.FINE, String.format("Sending message %s - %s", topic.getName(), topic.getGuid()));
statusCallback.success();
}
- } catch (JMSException ex) {
- statusCallback.fail(ex);
- throw new OseeWrappedException(ex);
- } catch (NullPointerException ex) {
+ } catch (Exception ex) {
statusCallback.fail(ex);
- throw new OseeWrappedException(ex);
+ OseeExceptions.wrapAndThrow(ex);
}
}
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ReplyConnectionActiveMqImpl.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ReplyConnectionActiveMqImpl.java
index 0332d2c4ae..9872296eb6 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ReplyConnectionActiveMqImpl.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ReplyConnectionActiveMqImpl.java
@@ -17,7 +17,7 @@ import javax.jms.Message;
import javax.jms.MessageProducer;
import javax.jms.Session;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeWrappedException;
+import org.eclipse.osee.framework.core.exception.OseeExceptions;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.messaging.OseeMessagingStatusCallback;
import org.eclipse.osee.framework.messaging.ReplyConnection;
@@ -62,7 +62,7 @@ class ReplyConnectionActiveMqImpl implements ReplyConnection {
OseeLog.log(Activator.class, Level.INFO, String.format("Sending Reply Message %s", message.toString()));
} catch (JMSException ex) {
statusCallback.fail(ex);
- throw new OseeWrappedException(ex);
+ OseeExceptions.wrapAndThrow(ex);
}
}

Back to the top