Author: borges
Date: 2011-08-05 10:58:22 -0400 (Fri, 05 Aug 2011)
New Revision: 11139
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/HornetQPacketHandler.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/HornetQServer.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/management/ManagementService.java
Log:
HORNETQ-720 Remove unused 'create replication' code
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/HornetQPacketHandler.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/HornetQPacketHandler.java 2011-08-05
13:41:29 UTC (rev 11138)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/protocol/core/impl/HornetQPacketHandler.java 2011-08-05
14:58:22 UTC (rev 11139)
@@ -25,14 +25,11 @@
import org.hornetq.core.protocol.core.Packet;
import org.hornetq.core.protocol.core.ServerSessionPacketHandler;
import org.hornetq.core.protocol.core.impl.wireformat.CreateQueueMessage;
-import org.hornetq.core.protocol.core.impl.wireformat.CreateReplicationSessionMessage;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionMessage;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionResponseMessage;
import org.hornetq.core.protocol.core.impl.wireformat.HornetQExceptionMessage;
-import org.hornetq.core.protocol.core.impl.wireformat.NullResponseMessage;
import org.hornetq.core.protocol.core.impl.wireformat.ReattachSessionMessage;
import org.hornetq.core.protocol.core.impl.wireformat.ReattachSessionResponseMessage;
-import org.hornetq.core.replication.ReplicationEndpoint;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.ServerSession;
import org.hornetq.core.version.Version;
@@ -102,16 +99,6 @@
break;
}
- case PacketImpl.CREATE_REPLICATION:
- {
- // Create queue can also be fielded here in the case of a replicated store
and forward queue creation
-
- CreateReplicationSessionMessage request =
(CreateReplicationSessionMessage)packet;
-
- handleCreateReplication(request);
-
- break;
- }
default:
{
log.error("Invalid packet " + packet);
@@ -293,32 +280,4 @@
log.error("Failed to handle create queue", e);
}
}
-
- private void handleCreateReplication(final CreateReplicationSessionMessage request)
- {
- Packet response;
-
- try
- {
- Channel channel = connection.getChannel(request.getSessionChannelID(), -1);
-
- ReplicationEndpoint endpoint = server.connectToReplicationEndpoint(channel);
-
- channel.setHandler(endpoint);
-
- response = new NullResponseMessage();
- }
- catch (HornetQException e)
- {
- response = new HornetQExceptionMessage(e);
- }
- catch (Exception e)
- {
- log.warn(e.getMessage(), e);
- response = new HornetQExceptionMessage(new
HornetQException(HornetQException.INTERNAL_ERROR));
- }
-
- channel1.send(response);
- }
-
}
\ No newline at end of file
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/HornetQServer.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/HornetQServer.java 2011-08-05
13:41:29 UTC (rev 11138)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/HornetQServer.java 2011-08-05
14:58:22 UTC (rev 11139)
@@ -27,7 +27,6 @@
import org.hornetq.core.paging.PagingManager;
import org.hornetq.core.persistence.StorageManager;
import org.hornetq.core.postoffice.PostOffice;
-import org.hornetq.core.protocol.core.Channel;
import org.hornetq.core.protocol.core.CoreRemotingConnection;
import org.hornetq.core.remoting.server.RemotingService;
import org.hornetq.core.replication.ReplicationEndpoint;
@@ -91,10 +90,6 @@
void unregisterActivateCallback(ActivateCallback callback);
- /** The journal at the backup server has to be equivalent as the journal used on the
live node.
- * Or else the backup node is out of sync. */
- ReplicationEndpoint connectToReplicationEndpoint(Channel channel) throws Exception;
-
ServerSession createSession(String name,
String username,
String password,
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-08-05
13:41:29 UTC (rev 11138)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-08-05
14:58:22 UTC (rev 11139)
@@ -1071,7 +1071,7 @@
* XXX FIXME to be made private, and method removed from Server interface once
HORNETQ-720 is
* finished.
*/
- public synchronized ReplicationEndpoint connectToReplicationEndpoint(final Channel
channel) throws Exception
+ private synchronized ReplicationEndpoint connectToReplicationEndpoint(final Channel
channel) throws Exception
{
if (!configuration.isBackup())
{
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/management/ManagementService.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/management/ManagementService.java 2011-08-05
13:41:29 UTC (rev 11138)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/management/ManagementService.java 2011-08-05
14:58:22 UTC (rev 11139)
@@ -18,11 +18,9 @@
import javax.management.ObjectName;
-import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.management.ObjectNameBuilder;
-import org.hornetq.core.cluster.DiscoveryGroup;
import org.hornetq.core.config.BridgeConfiguration;
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.ClusterConnectionConfiguration;
Show replies by date