Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorafinkbein2010-06-24 07:46:01 -0400
committerafinkbein2010-06-24 07:46:01 -0400
commit0f65a3a5720a7ae78145eb5271f698f56bc036ce (patch)
tree796cc50f086cd89e9d4ece0db6a595c701c77c9b /plugins/org.eclipse.osee.framework.messaging
parent0050dda70a82b360067011444b08c29b44c612b2 (diff)
downloadorg.eclipse.osee-0f65a3a5720a7ae78145eb5271f698f56bc036ce.tar.gz
org.eclipse.osee-0f65a3a5720a7ae78145eb5271f698f56bc036ce.tar.xz
org.eclipse.osee-0f65a3a5720a7ae78145eb5271f698f56bc036ce.zip
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/ActiveMqUtil.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqUtil.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqUtil.java
index 568c91b5d8..ab8a4b20d8 100644
--- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqUtil.java
+++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqUtil.java
@@ -5,12 +5,16 @@
*/
package org.eclipse.osee.framework.messaging.internal.activemq;
+import java.io.Serializable;
import java.io.UnsupportedEncodingException;
+
import javax.jms.BytesMessage;
import javax.jms.JMSException;
import javax.jms.Message;
+import javax.jms.ObjectMessage;
import javax.jms.Session;
import javax.jms.TextMessage;
+
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeExceptions;
import org.eclipse.osee.framework.messaging.internal.JAXBUtil;
@@ -42,6 +46,8 @@ class ActiveMqUtil {
byte[] bytes = new byte[length];
((BytesMessage)message).readBytes(bytes);
messageBody = bytes;
+ } else if(message instanceof ObjectMessage){
+ messageBody = ((ObjectMessage)message).getObject();
}
return messageBody;
}
@@ -54,6 +60,8 @@ class ActiveMqUtil {
BytesMessage byteMessage = session.createBytesMessage();
byteMessage.writeBytes((byte[]) body);
return byteMessage;
+ } else if (body instanceof Serializable){
+ return session.createObjectMessage((Serializable)body);
} else {
throw new OseeCoreException(String.format("Unsupported java type [%s]", body.getClass().getName()));
}

Back to the top