[teiid-commits] teiid SVN: r667 - trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Mon Mar 30 18:26:36 EDT 2009
Author: rareddy
Date: 2009-03-30 18:26:36 -0400 (Mon, 30 Mar 2009)
New Revision: 667
Modified:
trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/JGroupsMessageBus.java
Log:
TEIID-443: There is not a really need for a header
Modified: trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/JGroupsMessageBus.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/JGroupsMessageBus.java 2009-03-30 21:36:16 UTC (rev 666)
+++ trunk/server/src/main/java/com/metamatrix/common/messaging/jgroups/JGroupsMessageBus.java 2009-03-30 22:26:36 UTC (rev 667)
@@ -22,9 +22,6 @@
package com.metamatrix.common.messaging.jgroups;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
@@ -36,7 +33,6 @@
import org.jgroups.Channel;
import org.jgroups.ChannelException;
-import org.jgroups.Header;
import org.jgroups.Message;
import org.jgroups.ReceiverAdapter;
import org.jgroups.View;
@@ -63,7 +59,6 @@
public static final String MESSAGE_KEY = "MessageKey"; //$NON-NLS-1$
public static final int REMOTE_TIMEOUT = 30000;
- static final FederateHeader MSG_HEADER = new FederateHeader(456188434); // with some random number
private Channel channel;
private volatile boolean shutdown;
@@ -86,9 +81,7 @@
@Override
public void receive(Message msg) {
if (!msg.getSrc().equals(channel.getLocalAddress())) {
- if (MSG_HEADER.equals(msg.getHeader(MESSAGE_KEY))) {
- eventBroker.processEvent((EventObject) msg.getObject());
- }
+ eventBroker.processEvent((EventObject) msg.getObject());
}
}
@@ -155,7 +148,6 @@
if (obj != null) {
try {
Message msg = new Message(null, null, obj);
- msg.putHeader(MESSAGE_KEY, MSG_HEADER);
this.channel.send(msg);
} catch (Exception e) {
throw new MessagingException(e, ErrorMessageKeys.MESSAGING_ERR_0004, CommonPlugin.Util.getString(ErrorMessageKeys.MESSAGING_ERR_0004));
@@ -184,22 +176,6 @@
throws MessagingException {
}
-
- public static class FederateHeader extends Header {
- int type;
- public FederateHeader(int type) {
- this.type = type;
- }
-
- public void writeExternal(ObjectOutput out) throws IOException {
- out.writeInt(type);
- }
-
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
- type=in.readInt();
- }
- }
-
}
More information about the teiid-commits
mailing list