summaryrefslogtreecommitdiff
path: root/qpid/java/systests
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2008-07-04 16:28:53 +0000
committerMartin Ritchie <ritchiem@apache.org>2008-07-04 16:28:53 +0000
commitf15d072783f7cfe756cffe2a49dbf3c29fb44d8a (patch)
tree013222f24ad9e1f5bb292842e7f03df452239749 /qpid/java/systests
parent697360cf3bb8b76eca97705634d5008c230175d8 (diff)
downloadqpid-python-f15d072783f7cfe756cffe2a49dbf3c29fb44d8a.tar.gz
QPID-871 - Added a ConnectionRegistry per Virtualhost to track the open connections.
Altered the ApplicationRegistry so that when the shutdown hook is fired it: Unbinds from the listening sockets Then closes each virtualhost which in turn closes all the active TCP connections before closing the MessageStore thus preventing any logged errors occuring as a result of the active TCP connection performing an action on the closed store. Test provided MessageStoreShutdownTest which uses the new InternalBrokerBaseCase and InternalTestProtocolSession classes to perform system testing of the Broker without TCP framing or client codebase. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@674085 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/queue/MockProtocolSession.java5
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/util/TestApplicationRegistry.java34
2 files changed, 6 insertions, 33 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/MockProtocolSession.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/MockProtocolSession.java
index a1a405c313..14020299f6 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/MockProtocolSession.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/MockProtocolSession.java
@@ -21,6 +21,7 @@
package org.apache.qpid.server.queue;
import org.apache.qpid.AMQException;
+import org.apache.qpid.AMQConnectionException;
import org.apache.qpid.framing.*;
import org.apache.qpid.server.AMQChannel;
import org.apache.qpid.server.output.ProtocolOutputConverter;
@@ -117,6 +118,10 @@ public class MockProtocolSession implements AMQProtocolSession
{
}
+ public void closeConnection(int channelId, AMQConnectionException e, boolean closeIoSession) throws AMQException
+ {
+ }
+
public Object getKey()
{
return null;
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/util/TestApplicationRegistry.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/util/TestApplicationRegistry.java
index 83b4665be6..6b5ab632b0 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/util/TestApplicationRegistry.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/util/TestApplicationRegistry.java
@@ -52,15 +52,8 @@ public class TestApplicationRegistry extends ApplicationRegistry
private ExchangeFactory _exchangeFactory;
- private ManagedObjectRegistry _managedObjectRegistry;
-
- private ACLPlugin _accessManager;
-
- private PrincipalDatabaseManager _databaseManager;
-
- private AuthenticationManager _authenticationManager;
-
private MessageStore _messageStore;
+
private VirtualHost _vHost;
public TestApplicationRegistry()
@@ -92,11 +85,6 @@ public class TestApplicationRegistry extends ApplicationRegistry
_configuration.addProperty("heartbeat.delay", 10 * 60); // 10 minutes
}
- public Configuration getConfiguration()
- {
- return _configuration;
- }
-
public QueueRegistry getQueueRegistry()
{
return _queueRegistry;
@@ -112,21 +100,6 @@ public class TestApplicationRegistry extends ApplicationRegistry
return _exchangeFactory;
}
- public ManagedObjectRegistry getManagedObjectRegistry()
- {
- return _managedObjectRegistry;
- }
-
- public PrincipalDatabaseManager getDatabaseManager()
- {
- return _databaseManager;
- }
-
- public AuthenticationManager getAuthenticationManager()
- {
- return _authenticationManager;
- }
-
public Collection<String> getVirtualHostNames()
{
return null; //To change body of implemented methods use File | Settings | File Templates.
@@ -137,11 +110,6 @@ public class TestApplicationRegistry extends ApplicationRegistry
return null; //To change body of implemented methods use File | Settings | File Templates.
}
- public ACLPlugin getAccessManager()
- {
- return _accessManager;
- }
-
public void setAccessManager(ACLPlugin newManager)
{
_accessManager = newManager;