diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2008-10-24 15:41:36 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2008-10-24 15:41:36 +0000 |
| commit | 06a41e8beb398df3bdb85247a39734e4d0790970 (patch) | |
| tree | 30fbc5553754c41b761ff8405218dbb2b67ed0d2 /qpid/java/broker | |
| parent | 1a2088b70c851896bed56398a41efef85ac676b7 (diff) | |
| download | qpid-python-06a41e8beb398df3bdb85247a39734e4d0790970.tar.gz | |
QPID-1390 : Allow Authentication Manager to correctly close
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@707657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker')
3 files changed, 24 insertions, 2 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java index 63171d583a..c9c3acf61b 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java @@ -27,8 +27,11 @@ import org.apache.qpid.server.virtualhost.VirtualHost; import org.apache.qpid.server.virtualhost.VirtualHostRegistry; import org.apache.qpid.server.management.ManagedObjectRegistry; import org.apache.qpid.server.security.auth.manager.AuthenticationManager; +import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager; import org.apache.qpid.server.security.auth.database.PrincipalDatabaseManager; +import org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatabaseManager; import org.apache.qpid.server.security.access.ACLPlugin; +import org.apache.qpid.server.security.access.ACLManager; import org.apache.qpid.server.plugins.PluginManager; import org.apache.mina.common.IoAcceptor; @@ -207,11 +210,24 @@ public abstract class ApplicationRegistry implements IApplicationRegistry virtualHost.close(); } + // Replace above with this +// _virtualHostRegistry.close(); + +// _accessManager.close(); + +// _databaseManager.close(); + + _authenticationManager.close(); + +// _databaseManager.close(); + // close the rmi registry(if any) started for management - if (getManagedObjectRegistry() != null) + if (_managedObjectRegistry != null) { - getManagedObjectRegistry().close(); + _managedObjectRegistry.close(); } + +// _pluginManager.close(); } private void unbind() diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManager.java index bb94e0b7bf..d1803124a7 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManager.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManager.java @@ -34,4 +34,5 @@ public interface AuthenticationManager AuthenticationResult authenticate(SaslServer server, byte[] response); + void close(); } diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java index e5bf3edfca..7fbb68e861 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java @@ -233,4 +233,9 @@ public class PrincipalDatabaseAuthenticationManager implements AuthenticationMan return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, e); } } + + public void close() + { + Security.removeProvider(PROVIDER_NAME); + } } |
