From 455897cc245b67d929f409a93cfa7106e835cc1f Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 01 Mar 2007 03:27:06 +0000
Subject: [PATCH] This removes old debug logging framework method calls that are going to be automatically instrumented by AspectJ. Non instrumented debug method calls are updated to use the new debug framework methods. However, the new debug logging framework is not yet active as the Aspects are not weaved in. After this revision, debug logging will be disabled in the server until the new AOP framework is complete.
---
opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java | 60 ++++++++++++++++++++++++------------------------------------
1 files changed, 24 insertions(+), 36 deletions(-)
diff --git a/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java b/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
index 0013295..4823fdf 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
@@ -40,13 +40,14 @@
import org.opends.server.protocols.ldap.LDAPException;
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
import org.opends.server.types.ResultCode;
import org.opends.server.types.DN;
import org.opends.server.types.AuthenticationInfo;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugVerbose;
+import org.opends.server.types.DebugLogLevel;
/**
* A <code>RMIAuthenticator</code> manages authentication for the secure
@@ -56,11 +57,6 @@
*/
public class RmiAuthenticator implements JMXAuthenticator
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.jmx.RmiAuthenticator";
/**
* The client authencation mode. <code>true</code> indicates that the
@@ -91,7 +87,6 @@
*/
public RmiAuthenticator(JmxConnectionHandler jmxConnectionHandler)
{
- assert debugConstructor(CLASS_NAME);
this.jmxConnectionHandler = jmxConnectionHandler;
}
@@ -120,7 +115,6 @@
*/
public Subject authenticate(Object credentials)
{
- assert debugEnter(CLASS_NAME, "RmiAuthenticator");
//
// If we are in the finalized phase, we should not accept
@@ -147,34 +141,28 @@
// client
if (authcID == null)
{
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "RmiAuthenticator",
- "User name is Null ");
+ if (debugEnabled())
+ {
+ debugVerbose("User name is Null");
+ }
SecurityException se = new SecurityException();
throw se;
}
if (password == null)
{
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "RmiAuthenticator",
- "User password is Null ");
+ if (debugEnabled())
+ {
+ debugVerbose("User password is Null ");
+ }
SecurityException se = new SecurityException();
throw se;
}
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "RmiAuthenticator",
- "UserName =" + authcID);
+ if (debugEnabled())
+ {
+ debugVerbose("UserName = %s", authcID);
+ }
//
// Declare the client connection
@@ -189,8 +177,10 @@
}
catch (Exception e)
{
- assert debugException(
- CLASS_NAME, "RmiAuthenticator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
SecurityException se = new SecurityException();
se.initCause(e);
throw se;
@@ -277,12 +267,10 @@
bindOp.run();
if (bindOp.getResultCode() == ResultCode.SUCCESS)
{
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "bind",
- "User is authenticated");
+ if (debugEnabled())
+ {
+ debugVerbose("User is authenticated");
+ }
authInfo = bindOp.getAuthenticationInfo();
jmxClientConnection.setAuthenticationInfo(authInfo);
--
Gitblit v1.10.0