JBossWeb SVN: r223 - branches/2.0.x/src/share/classes/org/apache/catalina/util.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-15 11:33:21 -0400 (Wed, 15 Aug 2007)
New Revision: 223
Modified:
branches/2.0.x/src/share/classes/org/apache/catalina/util/RequestUtil.java
Log:
- Fix handling of '+' in URLs.
Modified: branches/2.0.x/src/share/classes/org/apache/catalina/util/RequestUtil.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/util/RequestUtil.java 2007-08-10 16:16:57 UTC (rev 222)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/util/RequestUtil.java 2007-08-15 15:33:21 UTC (rev 223)
@@ -187,7 +187,7 @@
* Decode and return the specified URL-encoded String.
* When the byte array is converted to a string, the system default
* character encoding is used... This may be different than some other
- * servers.
+ * servers. It is assumed the string is not a query string.
*
* @param str The url-encoded string
*
@@ -202,7 +202,8 @@
/**
- * Decode and return the specified URL-encoded String.
+ * Decode and return the specified URL-encoded String. It is assumed the
+ * string is not a query string.
*
* @param str The url-encoded string
* @param enc The encoding to use; if null, the default encoding is used
@@ -210,7 +211,19 @@
* by a valid 2-digit hexadecimal number
*/
public static String URLDecode(String str, String enc) {
+ return URLDecode(str, enc, false);
+ }
+ /**
+ * Decode and return the specified URL-encoded String.
+ *
+ * @param str The url-encoded string
+ * @param enc The encoding to use; if null, the default encoding is used
+ * @param isQuery Is this a query string being processed
+ * @exception IllegalArgumentException if a '%' character is not followed
+ * by a valid 2-digit hexadecimal number
+ */
+ public static String URLDecode(String str, String enc, boolean isQuery) {
if (str == null)
return (null);
@@ -226,7 +239,7 @@
}
} catch (UnsupportedEncodingException uee) {}
- return URLDecode(bytes, enc);
+ return URLDecode(bytes, enc, isQuery);
}
@@ -252,7 +265,20 @@
* by a valid 2-digit hexadecimal number
*/
public static String URLDecode(byte[] bytes, String enc) {
+ return URLDecode(bytes, null, false);
+ }
+ /**
+ * Decode and return the specified URL-encoded byte array.
+ *
+ * @param bytes The url-encoded byte array
+ * @param enc The encoding to use; if null, the default encoding is used
+ * @param isQuery Is this a query string being processed
+ * @exception IllegalArgumentException if a '%' character is not followed
+ * by a valid 2-digit hexadecimal number
+ */
+ public static String URLDecode(byte[] bytes, String enc, boolean isQuery) {
+
if (bytes == null)
return (null);
@@ -261,7 +287,7 @@
int ox = 0;
while (ix < len) {
byte b = bytes[ix++]; // Get byte to test
- if (b == '+') {
+ if (b == '+' && isQuery) {
b = (byte)' ';
} else if (b == '%') {
b = (byte) ((convertHexDigit(bytes[ix++]) << 4)
17 years, 7 months
JBossWeb SVN: r222 - in trunk/java/org: apache/catalina/authenticator and 36 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-10 12:16:57 -0400 (Fri, 10 Aug 2007)
New Revision: 222
Added:
trunk/java/org/jboss/logging/
trunk/java/org/jboss/logging/DynamicLogger.java
trunk/java/org/jboss/logging/Logger.java
trunk/java/org/jboss/logging/LoggerPlugin.java
trunk/java/org/jboss/logging/MDC.java
trunk/java/org/jboss/logging/MDCProvider.java
trunk/java/org/jboss/logging/MDCSupport.java
trunk/java/org/jboss/logging/NDC.java
trunk/java/org/jboss/logging/NDCProvider.java
trunk/java/org/jboss/logging/NDCSupport.java
trunk/java/org/jboss/logging/NullLoggerPlugin.java
trunk/java/org/jboss/logging/NullMDCProvider.java
trunk/java/org/jboss/logging/NullNDCProvider.java
trunk/java/org/jboss/logging/jdk/
trunk/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java
trunk/java/org/jboss/logging/jdk/JDKMDCProvider.java
trunk/java/org/jboss/logging/jdk/JDKNDCProvider.java
Removed:
trunk/java/org/apache/juli/logging/
Modified:
trunk/java/org/apache/catalina/Container.java
trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java
trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
trunk/java/org/apache/catalina/connector/Connector.java
trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
trunk/java/org/apache/catalina/connector/MapperListener.java
trunk/java/org/apache/catalina/core/AprLifecycleListener.java
trunk/java/org/apache/catalina/core/ContainerBase.java
trunk/java/org/apache/catalina/core/JasperListener.java
trunk/java/org/apache/catalina/core/NamingContextListener.java
trunk/java/org/apache/catalina/core/StandardContext.java
trunk/java/org/apache/catalina/core/StandardEngine.java
trunk/java/org/apache/catalina/core/StandardHost.java
trunk/java/org/apache/catalina/core/StandardHostValve.java
trunk/java/org/apache/catalina/core/StandardPipeline.java
trunk/java/org/apache/catalina/core/StandardServer.java
trunk/java/org/apache/catalina/core/StandardService.java
trunk/java/org/apache/catalina/core/StandardWrapper.java
trunk/java/org/apache/catalina/deploy/SecurityCollection.java
trunk/java/org/apache/catalina/loader/WebappClassLoader.java
trunk/java/org/apache/catalina/loader/WebappLoader.java
trunk/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java
trunk/java/org/apache/catalina/mbeans/MBeanFactory.java
trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
trunk/java/org/apache/catalina/mbeans/ServerLifecycleListener.java
trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java
trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
trunk/java/org/apache/catalina/realm/JAASRealm.java
trunk/java/org/apache/catalina/realm/MemoryRealm.java
trunk/java/org/apache/catalina/realm/RealmBase.java
trunk/java/org/apache/catalina/security/SecurityConfig.java
trunk/java/org/apache/catalina/security/SecurityUtil.java
trunk/java/org/apache/catalina/session/ManagerBase.java
trunk/java/org/apache/catalina/session/PersistentManagerBase.java
trunk/java/org/apache/catalina/startup/Bootstrap.java
trunk/java/org/apache/catalina/startup/Catalina.java
trunk/java/org/apache/catalina/startup/CatalinaProperties.java
trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java
trunk/java/org/apache/catalina/startup/ContextConfig.java
trunk/java/org/apache/catalina/startup/DigesterFactory.java
trunk/java/org/apache/catalina/startup/Embedded.java
trunk/java/org/apache/catalina/startup/EngineConfig.java
trunk/java/org/apache/catalina/startup/ExpandWar.java
trunk/java/org/apache/catalina/startup/HostConfig.java
trunk/java/org/apache/catalina/startup/TldConfig.java
trunk/java/org/apache/catalina/startup/Tool.java
trunk/java/org/apache/catalina/startup/UserConfig.java
trunk/java/org/apache/catalina/util/ExtensionValidator.java
trunk/java/org/apache/catalina/util/StringManager.java
trunk/java/org/apache/catalina/valves/AccessLogValve.java
trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
trunk/java/org/apache/catalina/valves/RequestDumperValve.java
trunk/java/org/apache/catalina/valves/ValveBase.java
trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
trunk/java/org/apache/coyote/ajp/AjpMessage.java
trunk/java/org/apache/coyote/ajp/AjpProcessor.java
trunk/java/org/apache/coyote/ajp/AjpProtocol.java
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
trunk/java/org/apache/coyote/http11/Http11Processor.java
trunk/java/org/apache/coyote/http11/Http11Protocol.java
trunk/java/org/apache/jasper/EmbeddedServletOptions.java
trunk/java/org/apache/jasper/JspC.java
trunk/java/org/apache/jasper/JspCompilationContext.java
trunk/java/org/apache/jasper/compiler/Compiler.java
trunk/java/org/apache/jasper/compiler/JspConfig.java
trunk/java/org/apache/jasper/compiler/JspReader.java
trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
trunk/java/org/apache/jasper/compiler/SmapUtil.java
trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
trunk/java/org/apache/jasper/compiler/TldLocationsCache.java
trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java
trunk/java/org/apache/jasper/runtime/TagHandlerPool.java
trunk/java/org/apache/jasper/security/SecurityClassLoad.java
trunk/java/org/apache/jasper/servlet/JspServlet.java
trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
trunk/java/org/apache/jasper/xmlparser/ParserUtils.java
trunk/java/org/apache/jasper/xmlparser/UCSReader.java
trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java
trunk/java/org/apache/naming/NamingContext.java
trunk/java/org/apache/naming/resources/FileDirContext.java
trunk/java/org/apache/naming/resources/WARDirContext.java
trunk/java/org/apache/tomcat/util/DomUtil.java
trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
trunk/java/org/apache/tomcat/util/buf/Base64.java
trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
trunk/java/org/apache/tomcat/util/buf/StringCache.java
trunk/java/org/apache/tomcat/util/buf/UDecoder.java
trunk/java/org/apache/tomcat/util/buf/UEncoder.java
trunk/java/org/apache/tomcat/util/buf/UTF8Decoder.java
trunk/java/org/apache/tomcat/util/collections/SimpleHashtable.java
trunk/java/org/apache/tomcat/util/collections/SimplePool.java
trunk/java/org/apache/tomcat/util/digester/Digester.java
trunk/java/org/apache/tomcat/util/digester/GenericParser.java
trunk/java/org/apache/tomcat/util/digester/XercesParser.java
trunk/java/org/apache/tomcat/util/http/Cookies.java
trunk/java/org/apache/tomcat/util/http/Parameters.java
trunk/java/org/apache/tomcat/util/http/ServerCookie.java
trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
trunk/java/org/apache/tomcat/util/modeler/Registry.java
trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java
trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
trunk/java/org/apache/tomcat/util/net/SSLImplementation.java
trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
trunk/java/org/jboss/web/php/LifecycleListener.java
trunk/java/org/jboss/web/php/ScriptEnvironment.java
Log:
- Switch to JBoss logging (from the package renamed commons-logging used previously).
- Still packaged as JULI for the standalone style distribution.
- Some modifications in JBoss logging (use jul first, and determine calling class and method in the jul plugin).
Modified: trunk/java/org/apache/catalina/Container.java
===================================================================
--- trunk/java/org/apache/catalina/Container.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/Container.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -26,7 +26,7 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
-import org.apache.juli.logging.Log;
+import org.jboss.logging.Logger;
/**
@@ -161,7 +161,7 @@
* no associated Logger, return the Logger associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
- public Log getLogger();
+ public Logger getLogger();
/**
Modified: trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
===================================================================
--- trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -49,8 +49,8 @@
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.valves.ValveBase;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -77,7 +77,7 @@
public abstract class AuthenticatorBase
extends ValveBase
implements Authenticator, Lifecycle {
- private static Log log = LogFactory.getLog(AuthenticatorBase.class);
+ private static Logger log = Logger.getLogger(AuthenticatorBase.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java
===================================================================
--- trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/authenticator/BasicAuthenticator.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -28,11 +28,11 @@
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.util.Base64;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.CharChunk;
import org.apache.tomcat.util.buf.MessageBytes;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
@@ -47,7 +47,7 @@
public class BasicAuthenticator
extends AuthenticatorBase {
- private static Log log = LogFactory.getLog(BasicAuthenticator.class);
+ private static Logger log = Logger.getLogger(BasicAuthenticator.class);
Modified: trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
===================================================================
--- trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -33,8 +33,8 @@
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.util.MD5Encoder;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
@@ -49,7 +49,7 @@
public class DigestAuthenticator
extends AuthenticatorBase {
- private static Log log = LogFactory.getLog(DigestAuthenticator.class);
+ private static Logger log = Logger.getLogger(DigestAuthenticator.class);
// -------------------------------------------------------------- Constants
Modified: trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -36,12 +36,12 @@
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;
import org.apache.coyote.ActionCode;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.CharChunk;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.tomcat.util.http.MimeHeaders;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -56,7 +56,7 @@
public class FormAuthenticator
extends AuthenticatorBase {
- private static Log log = LogFactory.getLog(FormAuthenticator.class);
+ private static Logger log = Logger.getLogger(FormAuthenticator.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/connector/Connector.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Connector.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/connector/Connector.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -37,11 +37,11 @@
import org.apache.catalina.util.StringManager;
import org.apache.coyote.Adapter;
import org.apache.coyote.ProtocolHandler;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.http.mapper.Mapper;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -56,7 +56,7 @@
public class Connector
implements Lifecycle, MBeanRegistration
{
- private static Log log = LogFactory.getLog(Connector.class);
+ private static Logger log = Logger.getLogger(Connector.class);
/**
Modified: trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -27,8 +27,6 @@
import org.apache.catalina.util.StringManager;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Adapter;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.B2CConverter;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.CharChunk;
@@ -36,6 +34,8 @@
import org.apache.tomcat.util.http.Cookies;
import org.apache.tomcat.util.http.ServerCookie;
import org.apache.tomcat.util.net.SocketStatus;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -50,7 +50,7 @@
public class CoyoteAdapter
implements Adapter
{
- private static Log log = LogFactory.getLog(CoyoteAdapter.class);
+ private static Logger log = Logger.getLogger(CoyoteAdapter.class);
// -------------------------------------------------------------- Constants
Modified: trunk/java/org/apache/catalina/connector/MapperListener.java
===================================================================
--- trunk/java/org/apache/catalina/connector/MapperListener.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/connector/MapperListener.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -26,14 +26,14 @@
import javax.management.ObjectInstance;
import javax.management.ObjectName;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.http.mapper.Mapper;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -45,7 +45,7 @@
public class MapperListener
implements NotificationListener
{
- private static Log log = LogFactory.getLog(MapperListener.class);
+ private static Logger log = Logger.getLogger(MapperListener.class);
// ----------------------------------------------------- Instance Variables
@@ -290,7 +290,7 @@
}
}
- if (!isRegisteredWithAlias && log.isWarnEnabled())
+ if (!isRegisteredWithAlias)
log.warn(sm.getString("mapperListener.unknownDefaultHost", defaultHost));
}
// This should probablt be called later
Modified: trunk/java/org/apache/catalina/core/AprLifecycleListener.java
===================================================================
--- trunk/java/org/apache/catalina/core/AprLifecycleListener.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/AprLifecycleListener.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -25,9 +25,9 @@
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.jni.Library;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
@@ -44,7 +44,7 @@
public class AprLifecycleListener
implements LifecycleListener {
- private static Log log = LogFactory.getLog(AprLifecycleListener.class);
+ private static Logger log = Logger.getLogger(AprLifecycleListener.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/catalina/core/ContainerBase.java
===================================================================
--- trunk/java/org/apache/catalina/core/ContainerBase.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/ContainerBase.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -54,10 +54,10 @@
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.naming.resources.ProxyDirContext;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -123,8 +123,8 @@
public abstract class ContainerBase
implements Container, Lifecycle, Pipeline, MBeanRegistration, Serializable {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( ContainerBase.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( ContainerBase.class );
/**
* Perform addChild with the permissions of this class.
@@ -185,7 +185,7 @@
/**
* The Logger implementation with which this Container is associated.
*/
- protected Log logger = null;
+ protected Logger logger = null;
/**
@@ -380,11 +380,11 @@
* no associated Logger, return the Logger associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
- public Log getLogger() {
+ public Logger getLogger() {
if (logger != null)
return (logger);
- logger = LogFactory.getLog(logName());
+ logger = Logger.getLogger(logName());
return (logger);
}
Modified: trunk/java/org/apache/catalina/core/JasperListener.java
===================================================================
--- trunk/java/org/apache/catalina/core/JasperListener.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/JasperListener.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -22,8 +22,8 @@
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -38,7 +38,7 @@
public class JasperListener
implements LifecycleListener {
- private static Log log = LogFactory.getLog(JasperListener.class);
+ private static Logger log = Logger.getLogger(JasperListener.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/catalina/core/NamingContextListener.java
===================================================================
--- trunk/java/org/apache/catalina/core/NamingContextListener.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/NamingContextListener.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -57,8 +57,6 @@
import org.apache.catalina.deploy.ContextTransaction;
import org.apache.catalina.deploy.NamingResources;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.naming.ContextAccessController;
import org.apache.naming.ContextBindings;
import org.apache.naming.EjbRef;
@@ -70,6 +68,8 @@
import org.apache.naming.ServiceRef;
import org.apache.naming.TransactionRef;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -83,13 +83,13 @@
public class NamingContextListener
implements LifecycleListener, ContainerListener, PropertyChangeListener {
- private static Log log = LogFactory.getLog(NamingContextListener.class);
+ private static Logger log = Logger.getLogger(NamingContextListener.class);
// ----------------------------------------------------- Instance Variables
- protected Log logger = log;
+ protected Logger logger = log;
/**
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -95,8 +95,6 @@
import org.apache.catalina.util.ExtensionValidator;
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.URLEncoder;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.naming.ContextBindings;
import org.apache.naming.resources.BaseDirContext;
import org.apache.naming.resources.DirContextURLStreamHandler;
@@ -104,6 +102,8 @@
import org.apache.naming.resources.ProxyDirContext;
import org.apache.naming.resources.WARDirContext;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Standard implementation of the <b>Context</b> interface. Each
@@ -119,7 +119,7 @@
extends ContainerBase
implements Context, Serializable, NotificationEmitter
{
- private static transient Log log = LogFactory.getLog(StandardContext.class);
+ private static transient Logger log = Logger.getLogger(StandardContext.class);
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/catalina/core/StandardEngine.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardEngine.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/StandardEngine.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -34,10 +34,10 @@
import org.apache.catalina.Service;
import org.apache.catalina.realm.JAASRealm;
import org.apache.catalina.util.ServerInfo;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.tomcat.util.modeler.modules.MbeansSource;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Standard implementation of the <b>Engine</b> interface. Each
@@ -53,7 +53,7 @@
extends ContainerBase
implements Engine {
- private static Log log = LogFactory.getLog(StandardEngine.class);
+ private static Logger log = Logger.getLogger(StandardEngine.class);
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/catalina/core/StandardHost.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardHost.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/StandardHost.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -48,8 +48,8 @@
{
/* Why do we implement deployer and delegate to deployer ??? */
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( StandardHost.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( StandardHost.class );
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/catalina/core/StandardHostValve.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardHostValve.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/StandardHostValve.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -37,8 +37,8 @@
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.valves.ValveBase;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -57,7 +57,7 @@
extends ValveBase {
- private static Log log = LogFactory.getLog(StandardHostValve.class);
+ private static Logger log = Logger.getLogger(StandardHostValve.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/core/StandardPipeline.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardPipeline.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/StandardPipeline.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -33,9 +33,9 @@
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.valves.ValveBase;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -55,7 +55,7 @@
implements Pipeline, Contained, Lifecycle
{
- private static Log log = LogFactory.getLog(StandardPipeline.class);
+ private static Logger log = Logger.getLogger(StandardPipeline.class);
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/catalina/core/StandardServer.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardServer.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/StandardServer.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -44,10 +44,10 @@
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.util.ServerInfo;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.StringCache;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
@@ -61,7 +61,7 @@
public final class StandardServer
implements Lifecycle, Server, MBeanRegistration
{
- private static Log log = LogFactory.getLog(StandardServer.class);
+ private static Logger log = Logger.getLogger(StandardServer.class);
// -------------------------------------------------------------- Constants
Modified: trunk/java/org/apache/catalina/core/StandardService.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardService.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/StandardService.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -35,11 +35,11 @@
import org.apache.catalina.connector.Connector;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
import java.util.ArrayList;
import org.apache.catalina.Executor;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -53,7 +53,7 @@
public class StandardService
implements Lifecycle, Service, MBeanRegistration
{
- private static Log log = LogFactory.getLog(StandardService.class);
+ private static Logger log = Logger.getLogger(StandardService.class);
/**
Modified: trunk/java/org/apache/catalina/core/StandardWrapper.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardWrapper.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/core/StandardWrapper.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -72,8 +72,8 @@
extends ContainerBase
implements ServletConfig, Wrapper, NotificationEmitter {
- protected static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( StandardWrapper.class );
+ protected static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( StandardWrapper.class );
protected static final String[] DEFAULT_SERVLET_METHODS = new String[] {
"GET", "HEAD", "POST" };
Modified: trunk/java/org/apache/catalina/deploy/SecurityCollection.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/SecurityCollection.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/deploy/SecurityCollection.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -21,8 +21,8 @@
import org.apache.catalina.util.RequestUtil;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
import java.io.Serializable;
@@ -44,7 +44,7 @@
public class SecurityCollection implements Serializable {
- private static Log log = LogFactory.getLog(SecurityCollection.class);
+ private static Logger log = Logger.getLogger(SecurityCollection.class);
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/catalina/loader/WebappClassLoader.java
===================================================================
--- trunk/java/org/apache/catalina/loader/WebappClassLoader.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/loader/WebappClassLoader.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -106,8 +106,8 @@
implements Reloader, Lifecycle
{
- protected static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( WebappClassLoader.class );
+ protected static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( WebappClassLoader.class );
public static final boolean ENABLE_CLEAR_REFERENCES =
Boolean.valueOf(System.getProperty("org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES", "true")).booleanValue();
@@ -1638,9 +1638,6 @@
// Clear the IntrospectionUtils cache.
IntrospectionUtils.clear();
- // Clear the classloader reference in common-logging
- org.apache.juli.logging.LogFactory.release(this);
-
// Clear the classloader reference in the VM's bean introspector
java.beans.Introspector.flushCaches();
Modified: trunk/java/org/apache/catalina/loader/WebappLoader.java
===================================================================
--- trunk/java/org/apache/catalina/loader/WebappLoader.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/loader/WebappLoader.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -1191,8 +1191,8 @@
}
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( WebappLoader.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( WebappLoader.class );
private ObjectName oname;
private MBeanServer mserver;
Modified: trunk/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java
===================================================================
--- trunk/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -28,9 +28,9 @@
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -45,7 +45,7 @@
public class GlobalResourcesLifecycleListener
implements LifecycleListener {
- private static Log log = LogFactory.getLog(GlobalResourcesLifecycleListener.class);
+ private static Logger log = Logger.getLogger(GlobalResourcesLifecycleListener.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/mbeans/MBeanFactory.java
===================================================================
--- trunk/java/org/apache/catalina/mbeans/MBeanFactory.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/mbeans/MBeanFactory.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -66,8 +66,8 @@
public class MBeanFactory extends BaseModelMBean {
- private static org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(MBeanFactory.class);
+ private static org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(MBeanFactory.class);
/**
* The <code>MBeanServer</code> for this application.
Modified: trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
===================================================================
--- trunk/java/org/apache/catalina/mbeans/MBeanUtils.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/mbeans/MBeanUtils.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -43,11 +43,11 @@
import org.apache.catalina.deploy.ContextResourceLink;
import org.apache.catalina.deploy.NamingResources;
import org.apache.catalina.valves.ValveBase;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.modeler.ManagedBean;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -59,7 +59,7 @@
*/
public class MBeanUtils {
- private static Log log = LogFactory.getLog(MBeanUtils.class);
+ private static Logger log = Logger.getLogger(MBeanUtils.class);
// ------------------------------------------------------- Static Variables
Modified: trunk/java/org/apache/catalina/mbeans/ServerLifecycleListener.java
===================================================================
--- trunk/java/org/apache/catalina/mbeans/ServerLifecycleListener.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/mbeans/ServerLifecycleListener.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -48,8 +48,8 @@
import org.apache.catalina.deploy.ContextResource;
import org.apache.catalina.deploy.ContextResourceLink;
import org.apache.catalina.deploy.NamingResources;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -65,7 +65,7 @@
public class ServerLifecycleListener
implements ContainerListener, LifecycleListener, PropertyChangeListener {
- private static Log log = LogFactory.getLog(ServerLifecycleListener.class);
+ private static Logger log = Logger.getLogger(ServerLifecycleListener.class);
// ------------------------------------------------------------- Properties
Modified: trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java
===================================================================
--- trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -27,8 +27,8 @@
import javax.security.auth.callback.UnsupportedCallbackException;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* <p>Implementation of the JAAS <code>CallbackHandler</code> interface,
@@ -49,7 +49,7 @@
*/
public class JAASCallbackHandler implements CallbackHandler {
- private static Log log = LogFactory.getLog(JAASCallbackHandler.class);
+ private static Logger log = Logger.getLogger(JAASCallbackHandler.class);
// ------------------------------------------------------------ Constructor
Modified: trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
===================================================================
--- trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -42,9 +42,9 @@
import org.apache.catalina.deploy.SecurityConstraint;
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.digester.Digester;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -79,7 +79,7 @@
public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule, Realm {
// We need to extend MemoryRealm to avoid class cast
- private static Log log = LogFactory.getLog(JAASMemoryLoginModule.class);
+ private static Logger log = Logger.getLogger(JAASMemoryLoginModule.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/realm/JAASRealm.java
===================================================================
--- trunk/java/org/apache/catalina/realm/JAASRealm.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/realm/JAASRealm.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -34,8 +34,8 @@
import org.apache.catalina.Container;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -126,7 +126,7 @@
public class JAASRealm
extends RealmBase
{
- private static Log log = LogFactory.getLog(JAASRealm.class);
+ private static Logger log = Logger.getLogger(JAASRealm.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/realm/MemoryRealm.java
===================================================================
--- trunk/java/org/apache/catalina/realm/MemoryRealm.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/realm/MemoryRealm.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -26,9 +26,9 @@
import java.util.Map;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.digester.Digester;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -47,7 +47,7 @@
public class MemoryRealm extends RealmBase {
- private static Log log = LogFactory.getLog(MemoryRealm.class);
+ private static Logger log = Logger.getLogger(MemoryRealm.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/realm/RealmBase.java
===================================================================
--- trunk/java/org/apache/catalina/realm/RealmBase.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/realm/RealmBase.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -52,9 +52,9 @@
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.MD5Encoder;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Simple implementation of <b>Realm</b> that reads an XML file to configure
@@ -68,7 +68,7 @@
public abstract class RealmBase
implements Lifecycle, Realm, MBeanRegistration {
- private static Log log = LogFactory.getLog(RealmBase.class);
+ private static Logger log = Logger.getLogger(RealmBase.class);
// ----------------------------------------------------- Instance Variables
@@ -82,7 +82,7 @@
/**
* Container log
*/
- protected Log containerLog = null;
+ protected Logger containerLog = null;
/**
Modified: trunk/java/org/apache/catalina/security/SecurityConfig.java
===================================================================
--- trunk/java/org/apache/catalina/security/SecurityConfig.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/security/SecurityConfig.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -28,8 +28,8 @@
public final class SecurityConfig{
private static SecurityConfig singleton = null;
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( SecurityConfig.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( SecurityConfig.class );
private final static String PACKAGE_ACCESS = "sun.,"
Modified: trunk/java/org/apache/catalina/security/SecurityUtil.java
===================================================================
--- trunk/java/org/apache/catalina/security/SecurityUtil.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/security/SecurityUtil.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -64,8 +64,8 @@
*/
private static HashMap objectCache = new HashMap();
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( SecurityUtil.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( SecurityUtil.class );
private static String PACKAGE = "org.apache.catalina.security";
Modified: trunk/java/org/apache/catalina/session/ManagerBase.java
===================================================================
--- trunk/java/org/apache/catalina/session/ManagerBase.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/session/ManagerBase.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -50,9 +50,9 @@
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.core.StandardHost;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -65,7 +65,7 @@
*/
public abstract class ManagerBase implements Manager, MBeanRegistration {
- protected Log log = LogFactory.getLog(ManagerBase.class);
+ protected Logger log = Logger.getLogger(ManagerBase.class);
// ----------------------------------------------------- Instance Variables
@@ -701,7 +701,7 @@
if( initialized ) return;
initialized=true;
- log = LogFactory.getLog(ManagerBase.class);
+ log = Logger.getLogger(ManagerBase.class);
if( oname==null ) {
try {
Modified: trunk/java/org/apache/catalina/session/PersistentManagerBase.java
===================================================================
--- trunk/java/org/apache/catalina/session/PersistentManagerBase.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/session/PersistentManagerBase.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -34,8 +34,8 @@
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.security.SecurityUtil;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Extends the <b>ManagerBase</b> class to implement most of the
* functionality required by a Manager which supports any kind of
@@ -54,7 +54,7 @@
extends ManagerBase
implements Lifecycle, PropertyChangeListener {
- private static Log log = LogFactory.getLog(PersistentManagerBase.class);
+ private static Logger log = Logger.getLogger(PersistentManagerBase.class);
// ---------------------------------------------------- Security Classes
Modified: trunk/java/org/apache/catalina/startup/Bootstrap.java
===================================================================
--- trunk/java/org/apache/catalina/startup/Bootstrap.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/Bootstrap.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -31,8 +31,8 @@
import javax.management.ObjectName;
import org.apache.catalina.security.SecurityClassLoad;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -51,7 +51,7 @@
public final class Bootstrap {
- private static Log log = LogFactory.getLog(Bootstrap.class);
+ private static Logger log = Logger.getLogger(Bootstrap.class);
// -------------------------------------------------------------- Constants
Modified: trunk/java/org/apache/catalina/startup/Catalina.java
===================================================================
--- trunk/java/org/apache/catalina/startup/Catalina.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/Catalina.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -670,8 +670,8 @@
}
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( Catalina.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( Catalina.class );
}
Modified: trunk/java/org/apache/catalina/startup/CatalinaProperties.java
===================================================================
--- trunk/java/org/apache/catalina/startup/CatalinaProperties.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/CatalinaProperties.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -38,8 +38,8 @@
// ------------------------------------------------------- Static Variables
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( CatalinaProperties.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( CatalinaProperties.class );
private static Properties properties = null;
Modified: trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java
===================================================================
--- trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/ClassLoaderFactory.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -24,8 +24,8 @@
import java.util.ArrayList;
import org.apache.catalina.loader.StandardClassLoader;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -50,7 +50,7 @@
public final class ClassLoaderFactory {
- private static Log log = LogFactory.getLog(ClassLoaderFactory.class);
+ private static Logger log = Logger.getLogger(ClassLoaderFactory.class);
protected static final Integer IS_DIR = new Integer(0);
protected static final Integer IS_JAR = new Integer(1);
Modified: trunk/java/org/apache/catalina/startup/ContextConfig.java
===================================================================
--- trunk/java/org/apache/catalina/startup/ContextConfig.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/ContextConfig.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -70,8 +70,8 @@
public class ContextConfig
implements LifecycleListener {
- protected static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( ContextConfig.class );
+ protected static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( ContextConfig.class );
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/startup/DigesterFactory.java
===================================================================
--- trunk/java/org/apache/catalina/startup/DigesterFactory.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/DigesterFactory.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -33,8 +33,8 @@
/**
* The log.
*/
- protected static org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(DigesterFactory.class);
+ protected static org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(DigesterFactory.class);
/**
* The XML entiry resolver used by the Digester.
Modified: trunk/java/org/apache/catalina/startup/Embedded.java
===================================================================
--- trunk/java/org/apache/catalina/startup/Embedded.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/Embedded.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -44,10 +44,10 @@
import org.apache.catalina.security.SecurityConfig;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.log.SystemLogHandler;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -102,7 +102,7 @@
*/
public class Embedded extends StandardService implements Lifecycle {
- private static Log log = LogFactory.getLog(Embedded.class);
+ private static Logger log = Logger.getLogger(Embedded.class);
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/catalina/startup/EngineConfig.java
===================================================================
--- trunk/java/org/apache/catalina/startup/EngineConfig.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/EngineConfig.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -38,8 +38,8 @@
implements LifecycleListener {
- protected static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( EngineConfig.class );
+ protected static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( EngineConfig.class );
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/startup/ExpandWar.java
===================================================================
--- trunk/java/org/apache/catalina/startup/ExpandWar.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/ExpandWar.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -33,8 +33,8 @@
import org.apache.catalina.Host;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Expand out a WAR in a Host's appBase.
@@ -47,7 +47,7 @@
public class ExpandWar {
- private static Log log = LogFactory.getLog(ExpandWar.class);
+ private static Logger log = Logger.getLogger(ExpandWar.class);
/**
* The string resources for this package.
Modified: trunk/java/org/apache/catalina/startup/HostConfig.java
===================================================================
--- trunk/java/org/apache/catalina/startup/HostConfig.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/HostConfig.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -57,8 +57,8 @@
public class HostConfig
implements LifecycleListener {
- protected static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( HostConfig.class );
+ protected static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( HostConfig.class );
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/startup/TldConfig.java
===================================================================
--- trunk/java/org/apache/catalina/startup/TldConfig.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/TldConfig.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -66,8 +66,8 @@
// Names of JARs that are known not to contain any TLDs
private static HashSet<String> noTldJars;
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( TldConfig.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( TldConfig.class );
/*
* Initializes the set of JARs that are known not to contain any TLDs
Modified: trunk/java/org/apache/catalina/startup/Tool.java
===================================================================
--- trunk/java/org/apache/catalina/startup/Tool.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/Tool.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -23,8 +23,8 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -73,7 +73,7 @@
public final class Tool {
- private static Log log = LogFactory.getLog(Tool.class);
+ private static Logger log = Logger.getLogger(Tool.class);
// ------------------------------------------------------- Static Variables
Modified: trunk/java/org/apache/catalina/startup/UserConfig.java
===================================================================
--- trunk/java/org/apache/catalina/startup/UserConfig.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/startup/UserConfig.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -45,8 +45,8 @@
implements LifecycleListener {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( UserConfig.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( UserConfig.class );
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/util/ExtensionValidator.java
===================================================================
--- trunk/java/org/apache/catalina/util/ExtensionValidator.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/util/ExtensionValidator.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -52,8 +52,8 @@
*/
public final class ExtensionValidator {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog(ExtensionValidator.class);
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger(ExtensionValidator.class);
/**
* The string resources for this package.
Modified: trunk/java/org/apache/catalina/util/StringManager.java
===================================================================
--- trunk/java/org/apache/catalina/util/StringManager.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/util/StringManager.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -56,8 +56,8 @@
private ResourceBundle bundle;
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( StringManager.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( StringManager.class );
/**
* Creates a new StringManager for a given package. This is a
Modified: trunk/java/org/apache/catalina/valves/AccessLogValve.java
===================================================================
--- trunk/java/org/apache/catalina/valves/AccessLogValve.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/valves/AccessLogValve.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -43,8 +43,8 @@
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -118,7 +118,7 @@
extends ValveBase
implements Lifecycle {
- private static Log log = LogFactory.getLog(AccessLogValve.class);
+ private static Logger log = Logger.getLogger(AccessLogValve.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
===================================================================
--- trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -36,8 +36,8 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.ServerInfo;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
@@ -129,7 +129,7 @@
extends AccessLogValve
implements Lifecycle {
- private static Log log = LogFactory.getLog(ExtendedAccessLogValve.class);
+ private static Logger log = Logger.getLogger(ExtendedAccessLogValve.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/catalina/valves/RequestDumperValve.java
===================================================================
--- trunk/java/org/apache/catalina/valves/RequestDumperValve.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/valves/RequestDumperValve.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -28,7 +28,7 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
+import org.jboss.logging.Logger;
/**
@@ -94,7 +94,7 @@
public void invoke(Request request, Response response)
throws IOException, ServletException {
- Log log = container.getLogger();
+ Logger log = container.getLogger();
// Log pre-service information
log.info("REQUEST URI =" + request.getRequestURI());
Modified: trunk/java/org/apache/catalina/valves/ValveBase.java
===================================================================
--- trunk/java/org/apache/catalina/valves/ValveBase.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/catalina/valves/ValveBase.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -40,8 +40,8 @@
import org.apache.catalina.connector.Response;
import org.apache.catalina.core.ContainerBase;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -57,7 +57,7 @@
public abstract class ValveBase
implements Contained, Valve, MBeanRegistration {
- private static Log log = LogFactory.getLog(ValveBase.class);
+ private static Logger log = Logger.getLogger(ValveBase.class);
//------------------------------------------------------ Instance Variables
@@ -71,7 +71,7 @@
/**
* Container log
*/
- protected Log containerLog = null;
+ protected Logger containerLog = null;
/**
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -61,8 +61,8 @@
/**
* Logger.
*/
- protected static org.apache.juli.logging.Log log
- = org.apache.juli.logging.LogFactory.getLog(AjpAprProcessor.class);
+ protected static org.jboss.logging.Logger log
+ = org.jboss.logging.Logger.getLogger(AjpAprProcessor.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -55,8 +55,8 @@
implements ProtocolHandler, MBeanRegistration {
- protected static org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(AjpAprProtocol.class);
+ protected static org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(AjpAprProtocol.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/coyote/ajp/AjpMessage.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpMessage.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/coyote/ajp/AjpMessage.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -38,8 +38,8 @@
public class AjpMessage {
- protected static org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(AjpMessage.class);
+ protected static org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(AjpMessage.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/coyote/ajp/AjpProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpProcessor.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/coyote/ajp/AjpProcessor.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -61,8 +61,8 @@
/**
* Logger.
*/
- protected static org.apache.juli.logging.Log log
- = org.apache.juli.logging.LogFactory.getLog(AjpProcessor.class);
+ protected static org.jboss.logging.Logger log
+ = org.jboss.logging.Logger.getLogger(AjpProcessor.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -55,8 +55,8 @@
implements ProtocolHandler, MBeanRegistration {
- protected static org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(AjpProtocol.class);
+ protected static org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(AjpProtocol.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -69,8 +69,8 @@
/**
* Logger.
*/
- protected static org.apache.juli.logging.Log log
- = org.apache.juli.logging.LogFactory.getLog(Http11AprProcessor.class);
+ protected static org.jboss.logging.Logger log
+ = org.jboss.logging.Logger.getLogger(Http11AprProcessor.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -54,8 +54,8 @@
*/
public class Http11AprProtocol implements ProtocolHandler, MBeanRegistration {
- protected static org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(Http11AprProtocol.class);
+ protected static org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(Http11AprProtocol.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/coyote/http11/Http11Processor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Processor.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/coyote/http11/Http11Processor.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -64,8 +64,8 @@
/**
* Logger.
*/
- protected static org.apache.juli.logging.Log log
- = org.apache.juli.logging.LogFactory.getLog(Http11Processor.class);
+ protected static org.jboss.logging.Logger log
+ = org.jboss.logging.Logger.getLogger(Http11Processor.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Protocol.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/coyote/http11/Http11Protocol.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -57,8 +57,8 @@
implements ProtocolHandler, MBeanRegistration {
- protected static org.apache.juli.logging.Log log
- = org.apache.juli.logging.LogFactory.getLog(Http11Protocol.class);
+ protected static org.jboss.logging.Logger log
+ = org.jboss.logging.Logger.getLogger(Http11Protocol.class);
/**
* The string manager for this package.
Modified: trunk/java/org/apache/jasper/EmbeddedServletOptions.java
===================================================================
--- trunk/java/org/apache/jasper/EmbeddedServletOptions.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/EmbeddedServletOptions.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -18,18 +18,19 @@
package org.apache.jasper;
import java.io.File;
-import java.util.*;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.Properties;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
-import org.apache.jasper.compiler.TldLocationsCache;
import org.apache.jasper.compiler.JspConfig;
-import org.apache.jasper.compiler.TagPluginManager;
import org.apache.jasper.compiler.Localizer;
+import org.apache.jasper.compiler.TagPluginManager;
+import org.apache.jasper.compiler.TldLocationsCache;
import org.apache.jasper.xmlparser.ParserUtils;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
/**
* A class to hold all init parameters specific to the JSP engine.
@@ -41,7 +42,7 @@
public final class EmbeddedServletOptions implements Options {
// Logger
- private Log log = LogFactory.getLog(EmbeddedServletOptions.class);
+ private Logger log = Logger.getLogger(EmbeddedServletOptions.class);
private Properties settings = new Properties();
@@ -419,9 +420,7 @@
} else if (keepgen.equalsIgnoreCase("false")) {
this.keepGenerated = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.keepgen"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.keepgen"));
}
}
@@ -433,9 +432,7 @@
} else if (trimsp.equalsIgnoreCase("false")) {
trimSpaces = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.trimspaces"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.trimspaces"));
}
}
@@ -447,9 +444,7 @@
if (poolingEnabledParam.equalsIgnoreCase("false")) {
this.isPoolingEnabled = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.enablePooling"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.enablePooling"));
}
}
@@ -460,9 +455,7 @@
} else if (mapFile.equalsIgnoreCase("false")) {
this.mappedFile = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.mappedFile"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.mappedFile"));
}
}
@@ -473,9 +466,7 @@
} else if (senderr.equalsIgnoreCase("false")) {
this.sendErrorToClient = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.sendErrToClient"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.sendErrToClient"));
}
}
@@ -486,9 +477,7 @@
} else if (debugInfo.equalsIgnoreCase("false")) {
this.classDebugInfo = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.classDebugInfo"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.classDebugInfo"));
}
}
@@ -497,9 +486,7 @@
try {
this.checkInterval = Integer.parseInt(checkInterval);
} catch(NumberFormatException ex) {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.checkInterval"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.checkInterval"));
}
}
@@ -508,9 +495,7 @@
try {
this.modificationTestInterval = Integer.parseInt(modificationTestInterval);
} catch(NumberFormatException ex) {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.modificationTestInterval"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.modificationTestInterval"));
}
}
@@ -521,9 +506,7 @@
} else if (development.equalsIgnoreCase("false")) {
this.development = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.development"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.development"));
}
}
@@ -534,9 +517,7 @@
} else if (suppressSmap.equalsIgnoreCase("false")) {
isSmapSuppressed = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.suppressSmap"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.suppressSmap"));
}
}
@@ -547,9 +528,7 @@
} else if (dumpSmap.equalsIgnoreCase("false")) {
isSmapDumped = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.dumpSmap"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.dumpSmap"));
}
}
@@ -560,9 +539,7 @@
} else if (genCharArray.equalsIgnoreCase("false")) {
genStringAsCharArray = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.genchararray"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.genchararray"));
}
}
@@ -574,9 +551,7 @@
} else if (errBeanClass.equalsIgnoreCase("false")) {
errorOnUseBeanInvalidClassAttribute = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.errBean"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.errBean"));
}
}
@@ -644,9 +619,7 @@
} else if (fork.equalsIgnoreCase("false")) {
this.fork = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.fork"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.fork"));
}
}
@@ -657,9 +630,7 @@
} else if (xpoweredBy.equalsIgnoreCase("false")) {
this.xpoweredBy = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.xpoweredBy"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.xpoweredBy"));
}
}
@@ -670,9 +641,7 @@
} else if (displaySourceFragment.equalsIgnoreCase("false")) {
this.displaySourceFragment = false;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage("jsp.warning.displaySourceFragment"));
- }
+ log.warn(Localizer.getMessage("jsp.warning.displaySourceFragment"));
}
}
Modified: trunk/java/org/apache/jasper/JspC.java
===================================================================
--- trunk/java/org/apache/jasper/JspC.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/JspC.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -47,12 +47,12 @@
import org.apache.jasper.compiler.TagPluginManager;
import org.apache.jasper.compiler.TldLocationsCache;
import org.apache.jasper.servlet.JspCServletContext;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.util.FileUtils;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Shell for the jspc compiler. Handles all options associated with the
@@ -95,7 +95,7 @@
"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";
// Logger
- protected static Log log = LogFactory.getLog(JspC.class);
+ protected static Logger log = Logger.getLogger(JspC.class);
protected static final String SWITCH_VERBOSE = "-v";
protected static final String SWITCH_HELP = "-help";
@@ -1033,7 +1033,7 @@
}
} catch (Exception e) {
- if ((e instanceof FileNotFoundException) && log.isWarnEnabled()) {
+ if (e instanceof FileNotFoundException) {
log.warn(Localizer.getMessage("jspc.error.fileDoesNotExist",
e.getMessage()));
}
@@ -1139,11 +1139,8 @@
fjsp = new File(uriRootF, nextjsp);
}
if (!fjsp.exists()) {
- if (log.isWarnEnabled()) {
- log.warn
- (Localizer.getMessage
- ("jspc.error.fileDoesNotExist", fjsp.toString()));
- }
+ log.warn(Localizer.getMessage
+ ("jspc.error.fileDoesNotExist", fjsp.toString()));
continue;
}
String s = fjsp.getAbsolutePath();
@@ -1175,11 +1172,11 @@
rootCause.printStackTrace();
}
throw je;
- } finally {
+ }/* finally {
if (loader != null) {
- LogFactory.release(loader);
+ Logger.release(loader);
}
- }
+ }*/
}
// ==================== protected utility methods ====================
Modified: trunk/java/org/apache/jasper/JspCompilationContext.java
===================================================================
--- trunk/java/org/apache/jasper/JspCompilationContext.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/JspCompilationContext.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -53,8 +53,8 @@
*/
public class JspCompilationContext {
- protected org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(JspCompilationContext.class);
+ protected org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(JspCompilationContext.class);
protected Map<String, URL> tagFileJarUrls;
protected boolean isPackagedTagFile;
Modified: trunk/java/org/apache/jasper/compiler/Compiler.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Compiler.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/compiler/Compiler.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -45,8 +45,8 @@
*/
public abstract class Compiler {
- protected org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory
- .getLog(Compiler.class);
+ protected org.jboss.logging.Logger log = org.jboss.logging.Logger
+ .getLogger(Compiler.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/jasper/compiler/JspConfig.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/JspConfig.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/compiler/JspConfig.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -27,8 +27,8 @@
import org.apache.jasper.JasperException;
import org.apache.jasper.xmlparser.ParserUtils;
import org.apache.jasper.xmlparser.TreeNode;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
import org.xml.sax.InputSource;
/**
@@ -44,7 +44,7 @@
private static final String WEB_XML = "/WEB-INF/web.xml";
// Logger
- private Log log = LogFactory.getLog(JspConfig.class);
+ private Logger log = Logger.getLogger(JspConfig.class);
private Vector jspProperties = null;
private ServletContext ctxt;
@@ -180,11 +180,9 @@
boolean isStar = "*".equals(extension);
if ((path == null && (extension == null || isStar))
|| (path != null && !isStar)) {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
- "jsp.warning.bad.urlpattern.propertygroup",
- urlPattern));
- }
+ log.warn(Localizer.getMessage(
+ "jsp.warning.bad.urlpattern.propertygroup",
+ urlPattern));
continue;
}
}
Modified: trunk/java/org/apache/jasper/compiler/JspReader.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/JspReader.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/compiler/JspReader.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -29,8 +29,8 @@
import org.apache.jasper.JasperException;
import org.apache.jasper.JspCompilationContext;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* JspReader is an input buffer for the JSP parser. It should allow
@@ -53,7 +53,7 @@
/**
* Logger.
*/
- private Log log = LogFactory.getLog(JspReader.class);
+ private Logger log = Logger.getLogger(JspReader.class);
/**
* The current spot in the file.
Modified: trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -39,8 +39,8 @@
import org.apache.jasper.runtime.JspFactoryImpl;
import org.apache.jasper.security.SecurityClassLoad;
import org.apache.jasper.servlet.JspServletWrapper;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Class for tracking JSP compile time file dependencies when the
@@ -58,7 +58,7 @@
public final class JspRuntimeContext {
// Logger
- private Log log = LogFactory.getLog(JspRuntimeContext.class);
+ private Logger log = Logger.getLogger(JspRuntimeContext.class);
/*
* Counts how many times the webapp's JSPs have been reloaded.
Modified: trunk/java/org/apache/jasper/compiler/SmapUtil.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/SmapUtil.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/compiler/SmapUtil.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -44,8 +44,8 @@
*/
public class SmapUtil {
- private org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( SmapUtil.class );
+ private org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( SmapUtil.class );
//*********************************************************************
// Constants
@@ -189,8 +189,8 @@
// Installation logic (from Robert Field, JSR-045 spec lead)
private static class SDEInstaller {
- private org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( SDEInstaller.class );
+ private org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( SDEInstaller.class );
static final String nameSDE = "SourceDebugExtension";
Modified: trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -49,8 +49,8 @@
import org.apache.jasper.JspCompilationContext;
import org.apache.jasper.xmlparser.ParserUtils;
import org.apache.jasper.xmlparser.TreeNode;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Implementation of the TagLibraryInfo class from the JSP spec.
@@ -64,7 +64,7 @@
class TagLibraryInfoImpl extends TagLibraryInfo implements TagConstants {
// Logger
- private Log log = LogFactory.getLog(TagLibraryInfoImpl.class);
+ private Logger log = Logger.getLogger(TagLibraryInfoImpl.class);
private JspCompilationContext ctxt;
@@ -268,10 +268,8 @@
} else if ("taglib-extension".equals(tname)) {
// Recognized but ignored
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
- "jsp.warning.unknown.element.in.taglib", tname));
- }
+ log.warn(Localizer.getMessage(
+ "jsp.warning.unknown.element.in.taglib", tname));
}
}
@@ -403,10 +401,8 @@
} else if ("tag-extension".equals(tname)) {
// Ignored
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
+ log.warn(Localizer.getMessage(
"jsp.warning.unknown.element.in.tag", tname));
- }
}
}
@@ -468,10 +464,8 @@
|| "description".equals(tname)) {
// Ignore these elements: Bugzilla 38015
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
+ log.warn(Localizer.getMessage(
"jsp.warning.unknown.element.in.tagfile", tname));
- }
}
}
@@ -555,10 +549,8 @@
false) {
;
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
+ log.warn(Localizer.getMessage(
"jsp.warning.unknown.element.in.attribute", tname));
- }
}
}
@@ -621,10 +613,8 @@
} else if ("description".equals(tname) || // Ignored elements
false) {
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
+ log.warn(Localizer.getMessage(
"jsp.warning.unknown.element.in.variable", tname));
- }
}
}
return new TagVariableInfo(nameGiven, nameFromAttribute, className,
@@ -649,10 +639,8 @@
} else if ("description".equals(tname) || // Ignored elements
false) {
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
+ log.warn(Localizer.getMessage(
"jsp.warning.unknown.element.in.validator", tname));
- }
}
}
@@ -687,10 +675,8 @@
} else if ("description".equals(tname)) {
; // Do nothing
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
+ log.warn(Localizer.getMessage(
"jsp.warning.unknown.element.in.initParam", tname));
- }
}
}
return initParam;
@@ -717,10 +703,8 @@
"small-icon".equals(tname) || "large-icon".equals(tname)
|| "description".equals(tname) || "example".equals(tname)) {
} else {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
+ log.warn(Localizer.getMessage(
"jsp.warning.unknown.element.in.function", tname));
- }
}
}
Modified: trunk/java/org/apache/jasper/compiler/TldLocationsCache.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TldLocationsCache.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/compiler/TldLocationsCache.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -39,8 +39,8 @@
import org.apache.jasper.JasperException;
import org.apache.jasper.xmlparser.ParserUtils;
import org.apache.jasper.xmlparser.TreeNode;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* A container for all tag libraries that are defined "globally"
@@ -78,7 +78,7 @@
public class TldLocationsCache {
// Logger
- private Log log = LogFactory.getLog(TldLocationsCache.class);
+ private Logger log = Logger.getLogger(TldLocationsCache.class);
/**
* The types of URI one may specify for a tag library
@@ -266,15 +266,13 @@
try {
uri = new URL(FILE_PROTOCOL+altDDName.replace('\\', '/'));
} catch (MalformedURLException e) {
- if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
+ log.warn(Localizer.getMessage(
"jsp.error.internal.filenotfound",
altDDName));
- }
}
} else {
uri = ctxt.getResource(WEB_XML);
- if (uri == null && log.isWarnEnabled()) {
+ if (uri == null) {
log.warn(Localizer.getMessage(
"jsp.error.internal.filenotfound",
WEB_XML));
Modified: trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java
===================================================================
--- trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -29,8 +29,8 @@
import javax.servlet.jsp.PageContext;
import org.apache.jasper.Constants;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Implementation of JspFactory.
@@ -40,7 +40,7 @@
public class JspFactoryImpl extends JspFactory {
// Logger
- private Log log = LogFactory.getLog(JspFactoryImpl.class);
+ private Logger log = Logger.getLogger(JspFactoryImpl.class);
private static final String SPEC_VERSION = "2.1";
private static final boolean USE_POOL =
Modified: trunk/java/org/apache/jasper/runtime/TagHandlerPool.java
===================================================================
--- trunk/java/org/apache/jasper/runtime/TagHandlerPool.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/runtime/TagHandlerPool.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -23,8 +23,8 @@
import org.apache.InstanceManager;
import org.apache.jasper.Constants;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Pool of tag handlers that can be reused.
@@ -38,7 +38,7 @@
public static String OPTION_TAGPOOL="tagpoolClassName";
public static String OPTION_MAXSIZE="tagpoolMaxSize";
- private Log log = LogFactory.getLog(TagHandlerPool.class);
+ private Logger log = Logger.getLogger(TagHandlerPool.class);
// index of next available tag handler
private int current;
Modified: trunk/java/org/apache/jasper/security/SecurityClassLoad.java
===================================================================
--- trunk/java/org/apache/jasper/security/SecurityClassLoad.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/security/SecurityClassLoad.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -28,8 +28,8 @@
public final class SecurityClassLoad {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( SecurityClassLoad.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( SecurityClassLoad.class );
public static void securityClassLoad(ClassLoader loader){
Modified: trunk/java/org/apache/jasper/servlet/JspServlet.java
===================================================================
--- trunk/java/org/apache/jasper/servlet/JspServlet.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/servlet/JspServlet.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -35,8 +35,8 @@
import org.apache.jasper.Options;
import org.apache.jasper.compiler.JspRuntimeContext;
import org.apache.jasper.compiler.Localizer;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* The JSP engine (a.k.a Jasper).
@@ -57,7 +57,7 @@
public class JspServlet extends HttpServlet implements PeriodicEventListener {
// Logger
- private Log log = LogFactory.getLog(JspServlet.class);
+ private Logger log = Logger.getLogger(JspServlet.class);
private ServletContext context;
private ServletConfig config;
Modified: trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
===================================================================
--- trunk/java/org/apache/jasper/servlet/JspServletWrapper.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/servlet/JspServletWrapper.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -41,8 +41,8 @@
import org.apache.jasper.compiler.Localizer;
import org.apache.jasper.runtime.InstanceManagerFactory;
import org.apache.jasper.runtime.JspSourceDependent;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* The JSP engine (a.k.a Jasper).
@@ -65,7 +65,7 @@
public class JspServletWrapper {
// Logger
- private Log log = LogFactory.getLog(JspServletWrapper.class);
+ private Logger log = Logger.getLogger(JspServletWrapper.class);
private Servlet theServlet;
private String jspUri;
Modified: trunk/java/org/apache/jasper/xmlparser/ParserUtils.java
===================================================================
--- trunk/java/org/apache/jasper/xmlparser/ParserUtils.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/xmlparser/ParserUtils.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -27,8 +27,8 @@
import org.apache.jasper.Constants;
import org.apache.jasper.JasperException;
import org.apache.jasper.compiler.Localizer;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
import org.w3c.dom.Comment;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -192,7 +192,7 @@
class MyEntityResolver implements EntityResolver {
// Logger
- private Log log = LogFactory.getLog(MyEntityResolver.class);
+ private Logger log = Logger.getLogger(MyEntityResolver.class);
public InputSource resolveEntity(String publicId, String systemId)
throws SAXException {
@@ -221,7 +221,7 @@
class MyErrorHandler implements ErrorHandler {
// Logger
- private Log log = LogFactory.getLog(MyErrorHandler.class);
+ private Logger log = Logger.getLogger(MyErrorHandler.class);
public void warning(SAXParseException ex) throws SAXException {
if (log.isDebugEnabled())
Modified: trunk/java/org/apache/jasper/xmlparser/UCSReader.java
===================================================================
--- trunk/java/org/apache/jasper/xmlparser/UCSReader.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/xmlparser/UCSReader.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -31,8 +31,8 @@
*/
public class UCSReader extends Reader {
- private org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( UCSReader.class );
+ private org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( UCSReader.class );
//
// Constants
Modified: trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java
===================================================================
--- trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -31,8 +31,8 @@
public class UTF8Reader
extends Reader {
- private org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( UTF8Reader.class );
+ private org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( UTF8Reader.class );
//
// Constants
Modified: trunk/java/org/apache/naming/NamingContext.java
===================================================================
--- trunk/java/org/apache/naming/NamingContext.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/naming/NamingContext.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -55,8 +55,8 @@
protected static final NameParser nameParser = new NameParserImpl();
- private static org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(NamingContext.class);
+ private static org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(NamingContext.class);
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/naming/resources/FileDirContext.java
===================================================================
--- trunk/java/org/apache/naming/resources/FileDirContext.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/naming/resources/FileDirContext.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -50,8 +50,8 @@
public class FileDirContext extends BaseDirContext {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( FileDirContext.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( FileDirContext.class );
// -------------------------------------------------------------- Constants
Modified: trunk/java/org/apache/naming/resources/WARDirContext.java
===================================================================
--- trunk/java/org/apache/naming/resources/WARDirContext.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/naming/resources/WARDirContext.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -53,8 +53,8 @@
public class WARDirContext extends BaseDirContext {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( WARDirContext.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( WARDirContext.class );
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/tomcat/util/DomUtil.java
===================================================================
--- trunk/java/org/apache/tomcat/util/DomUtil.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/DomUtil.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -45,8 +45,8 @@
* @author Costin Manolache
*/
public class DomUtil {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( DomUtil.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( DomUtil.class );
// -------------------- DOM utils --------------------
Modified: trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
===================================================================
--- trunk/java/org/apache/tomcat/util/IntrospectionUtils.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/IntrospectionUtils.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -38,8 +38,8 @@
public final class IntrospectionUtils {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( IntrospectionUtils.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( IntrospectionUtils.class );
/**
* Call execute() - any ant-like task should work
Modified: trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/B2CConverter.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/buf/B2CConverter.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -37,8 +37,8 @@
public class B2CConverter {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( B2CConverter.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( B2CConverter.class );
private IntermediateInputStream iis;
private ReadConvertor conv;
Modified: trunk/java/org/apache/tomcat/util/buf/Base64.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/Base64.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/buf/Base64.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -34,8 +34,8 @@
public final class Base64 {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( Base64.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( Base64.class );
static private final int BASELENGTH = 255;
static private final int LOOKUPLENGTH = 63;
Modified: trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/C2BConverter.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/buf/C2BConverter.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -31,8 +31,8 @@
*/
public final class C2BConverter {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog(C2BConverter.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger(C2BConverter.class );
private IntermediateOutputStream ios;
private WriteConvertor conv;
Modified: trunk/java/org/apache/tomcat/util/buf/StringCache.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/StringCache.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/buf/StringCache.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -30,8 +30,8 @@
public class StringCache {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( StringCache.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( StringCache.class );
// ------------------------------------------------------- Static Variables
Modified: trunk/java/org/apache/tomcat/util/buf/UDecoder.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/UDecoder.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/buf/UDecoder.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -30,8 +30,8 @@
*/
public final class UDecoder {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog(UDecoder.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger(UDecoder.class );
protected static final boolean ALLOW_ENCODED_SLASH =
Boolean.valueOf(System.getProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "false")).booleanValue();
Modified: trunk/java/org/apache/tomcat/util/buf/UEncoder.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/UEncoder.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/buf/UEncoder.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -34,8 +34,8 @@
*/
public final class UEncoder {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog(UEncoder.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger(UEncoder.class );
// Not static - the set may differ ( it's better than adding
// an extra check for "/", "+", etc
Modified: trunk/java/org/apache/tomcat/util/buf/UTF8Decoder.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/UTF8Decoder.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/buf/UTF8Decoder.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -34,8 +34,8 @@
public final class UTF8Decoder extends B2CConverter {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog(UTF8Decoder.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger(UTF8Decoder.class );
// may have state !!
Modified: trunk/java/org/apache/tomcat/util/collections/SimpleHashtable.java
===================================================================
--- trunk/java/org/apache/tomcat/util/collections/SimpleHashtable.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/collections/SimpleHashtable.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -59,8 +59,8 @@
public final class SimpleHashtable implements Enumeration
{
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog( SimpleHashtable.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger( SimpleHashtable.class );
// entries ...
private Entry table[];
Modified: trunk/java/org/apache/tomcat/util/collections/SimplePool.java
===================================================================
--- trunk/java/org/apache/tomcat/util/collections/SimplePool.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/collections/SimplePool.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -28,8 +28,8 @@
public final class SimplePool {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog(SimplePool.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger(SimplePool.class );
/*
* Where the threads are held.
Modified: trunk/java/org/apache/tomcat/util/digester/Digester.java
===================================================================
--- trunk/java/org/apache/tomcat/util/digester/Digester.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/digester/Digester.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -36,9 +36,9 @@
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.IntrospectionUtils;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
@@ -327,15 +327,15 @@
/**
* The Log to which most logging calls will be made.
*/
- protected Log log =
- LogFactory.getLog("org.apache.commons.digester.Digester");
+ protected Logger log =
+ Logger.getLogger("org.apache.commons.digester.Digester");
/**
* The Log to which all SAX event related logging calls will be made.
*/
- protected Log saxLog =
- LogFactory.getLog("org.apache.commons.digester.Digester.sax");
+ protected Logger saxLog =
+ Logger.getLogger("org.apache.commons.digester.Digester.sax");
/**
@@ -562,7 +562,7 @@
/**
* Return the current Logger associated with this instance of the Digester
*/
- public Log getLogger() {
+ public Logger getLogger() {
return log;
@@ -572,7 +572,7 @@
/**
* Set the current logger for this Digester.
*/
- public void setLogger(Log log) {
+ public void setLogger(Logger log) {
this.log = log;
@@ -584,7 +584,7 @@
*
* @since 1.6
*/
- public Log getSAXLogger() {
+ public Logger getSAXLogger() {
return saxLog;
}
@@ -597,7 +597,7 @@
*
* @since 1.6
*/
- public void setSAXLogger(Log saxLog) {
+ public void setSAXLogger(Logger saxLog) {
this.saxLog = saxLog;
}
@@ -2636,8 +2636,8 @@
return;
}
- log = LogFactory.getLog("org.apache.commons.digester.Digester");
- saxLog = LogFactory.getLog("org.apache.commons.digester.Digester.sax");
+ log = Logger.getLogger("org.apache.commons.digester.Digester");
+ saxLog = Logger.getLogger("org.apache.commons.digester.Digester.sax");
// Perform lazy configuration as needed
initialize(); // call hook method for subclasses that want to be initialized once only
Modified: trunk/java/org/apache/tomcat/util/digester/GenericParser.java
===================================================================
--- trunk/java/org/apache/tomcat/util/digester/GenericParser.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/digester/GenericParser.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -25,8 +25,8 @@
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
@@ -41,8 +41,8 @@
/**
* The Log to which all SAX event related logging calls will be made.
*/
- protected static Log log =
- LogFactory.getLog("org.apache.commons.digester.Digester.sax");
+ protected static Logger log =
+ Logger.getLogger("org.apache.commons.digester.Digester.sax");
/**
* The JAXP 1.2 property required to set up the schema location.
Modified: trunk/java/org/apache/tomcat/util/digester/XercesParser.java
===================================================================
--- trunk/java/org/apache/tomcat/util/digester/XercesParser.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/digester/XercesParser.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -26,8 +26,8 @@
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;
@@ -46,8 +46,8 @@
/**
* The Log to which all SAX event related logging calls will be made.
*/
- protected static Log log =
- LogFactory.getLog("org.apache.commons.digester.Digester.sax");
+ protected static Logger log =
+ Logger.getLogger("org.apache.commons.digester.Digester.sax");
/**
Modified: trunk/java/org/apache/tomcat/util/http/Cookies.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/Cookies.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/http/Cookies.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -35,8 +35,8 @@
*/
public final class Cookies { // extends MultiMap {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog(Cookies.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger(Cookies.class );
// expected average number of cookies per request
public static final int INITIAL_SIZE=4;
Modified: trunk/java/org/apache/tomcat/util/http/Parameters.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/Parameters.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/http/Parameters.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -34,8 +34,8 @@
public final class Parameters extends MultiMap {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog(Parameters.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger(Parameters.class );
// Transition: we'll use the same Hashtable( String->String[] )
// for the beginning. When we are sure all accesses happen through
Modified: trunk/java/org/apache/tomcat/util/http/ServerCookie.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -37,8 +37,8 @@
public class ServerCookie implements Serializable {
- private static org.apache.juli.logging.Log log=
- org.apache.juli.logging.LogFactory.getLog(ServerCookie.class );
+ private static org.jboss.logging.Logger log=
+ org.jboss.logging.Logger.getLogger(ServerCookie.class );
private MessageBytes name=MessageBytes.newInstance();
private MessageBytes value=MessageBytes.newInstance();
Modified: trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -35,8 +35,8 @@
public final class Mapper {
- private static org.apache.juli.logging.Log logger =
- org.apache.juli.logging.LogFactory.getLog(Mapper.class);
+ private static org.jboss.logging.Logger logger =
+ org.jboss.logging.Logger.getLogger(Mapper.class);
// ----------------------------------------------------- Instance Variables
Modified: trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
===================================================================
--- trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/modeler/BaseModelMBean.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -46,8 +46,8 @@
import javax.management.modelmbean.InvalidTargetObjectTypeException;
import javax.management.modelmbean.ModelMBeanNotificationBroadcaster;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/*
* Changes from commons.modeler:
@@ -101,7 +101,7 @@
* @author Costin Manolache
*/
public class BaseModelMBean implements DynamicMBean, MBeanRegistration, ModelMBeanNotificationBroadcaster {
- private static Log log = LogFactory.getLog(BaseModelMBean.class);
+ private static Logger log = Logger.getLogger(BaseModelMBean.class);
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/tomcat/util/modeler/Registry.java
===================================================================
--- trunk/java/org/apache/tomcat/util/modeler/Registry.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/modeler/Registry.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -39,9 +39,9 @@
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.modules.ModelerSource;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/*
Issues:
@@ -75,7 +75,7 @@
/**
* The Log instance to which we will write our log messages.
*/
- private static Log log = LogFactory.getLog(Registry.class);
+ private static Logger log = Logger.getLogger(Registry.class);
// Support for the factory methods
Modified: trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
===================================================================
--- trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -22,8 +22,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.DomUtil;
import org.apache.tomcat.util.modeler.AttributeInfo;
import org.apache.tomcat.util.modeler.ManagedBean;
@@ -31,13 +29,15 @@
import org.apache.tomcat.util.modeler.OperationInfo;
import org.apache.tomcat.util.modeler.ParameterInfo;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
public class MbeansDescriptorsDOMSource extends ModelerSource
{
- private static Log log = LogFactory.getLog(MbeansDescriptorsDOMSource.class);
+ private static Logger log = Logger.getLogger(MbeansDescriptorsDOMSource.class);
Registry registry;
String location;
Modified: trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
===================================================================
--- trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -25,13 +25,13 @@
import org.apache.tomcat.util.digester.Digester;
import org.apache.tomcat.util.modeler.Registry;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
public class MbeansDescriptorsDigesterSource extends ModelerSource
{
- private static Log log =
- LogFactory.getLog(MbeansDescriptorsDigesterSource.class);
+ private static Logger log =
+ Logger.getLogger(MbeansDescriptorsDigesterSource.class);
Registry registry;
String location;
Modified: trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
===================================================================
--- trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -28,17 +28,17 @@
import javax.management.ObjectName;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.AttributeInfo;
import org.apache.tomcat.util.modeler.ManagedBean;
import org.apache.tomcat.util.modeler.OperationInfo;
import org.apache.tomcat.util.modeler.ParameterInfo;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
public class MbeansDescriptorsIntrospectionSource extends ModelerSource
{
- private static Log log = LogFactory.getLog(MbeansDescriptorsIntrospectionSource.class);
+ private static Logger log = Logger.getLogger(MbeansDescriptorsIntrospectionSource.class);
Registry registry;
String location;
Modified: trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
===================================================================
--- trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -22,15 +22,15 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.ManagedBean;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
public class MbeansDescriptorsSerSource extends ModelerSource
{
- private static Log log = LogFactory.getLog(MbeansDescriptorsSerSource.class);
+ private static Logger log = Logger.getLogger(MbeansDescriptorsSerSource.class);
Registry registry;
String location;
String type;
Modified: trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java
===================================================================
--- trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -30,13 +30,13 @@
import javax.management.loading.MLet;
import javax.xml.transform.TransformerException;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.DomUtil;
import org.apache.tomcat.util.modeler.AttributeInfo;
import org.apache.tomcat.util.modeler.BaseModelMBean;
import org.apache.tomcat.util.modeler.ManagedBean;
import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -53,7 +53,7 @@
*/
public class MbeansSource extends ModelerSource implements MbeansSourceMBean
{
- private static Log log = LogFactory.getLog(MbeansSource.class);
+ private static Logger log = Logger.getLogger(MbeansSource.class);
Registry registry;
String type;
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -22,8 +22,6 @@
import java.util.HashMap;
import java.util.concurrent.Executor;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.jni.Address;
import org.apache.tomcat.jni.Error;
import org.apache.tomcat.jni.File;
@@ -37,6 +35,8 @@
import org.apache.tomcat.jni.Socket;
import org.apache.tomcat.jni.Status;
import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* APR tailored thread pool, providing the following services:
@@ -59,7 +59,7 @@
// -------------------------------------------------------------- Constants
- protected static Log log = LogFactory.getLog(AprEndpoint.class);
+ protected static Logger log = Logger.getLogger(AprEndpoint.class);
protected static StringManager sm =
StringManager.getManager("org.apache.tomcat.util.net.res");
Modified: trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -20,9 +20,9 @@
import java.net.InetAddress;
import java.util.concurrent.Executor;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* APR tailored thread pool, providing the following services:
@@ -45,7 +45,7 @@
// -------------------------------------------------------------- Constants
- protected static Log log = LogFactory.getLog(BaseEndpoint.class);
+ protected static Logger log = Logger.getLogger(BaseEndpoint.class);
protected static StringManager sm =
StringManager.getManager("org.apache.tomcat.util.net.res");
Modified: trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -24,9 +24,9 @@
import java.net.Socket;
import java.util.concurrent.Executor;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Handle incoming TCP connections.
@@ -50,7 +50,7 @@
// -------------------------------------------------------------- Constants
- protected static Log log = LogFactory.getLog(JIoEndpoint.class);
+ protected static Logger log = Logger.getLogger(JIoEndpoint.class);
protected StringManager sm =
StringManager.getManager("org.apache.tomcat.util.net.res");
Modified: trunk/java/org/apache/tomcat/util/net/SSLImplementation.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/SSLImplementation.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/net/SSLImplementation.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -27,8 +27,8 @@
@author EKR
*/
abstract public class SSLImplementation {
- private static org.apache.juli.logging.Log logger =
- org.apache.juli.logging.LogFactory.getLog(SSLImplementation.class);
+ private static org.jboss.logging.Logger logger =
+ org.jboss.logging.Logger.getLogger(SSLImplementation.class);
// The default implementations in our search path
private static final String PureTLSImplementationClass=
Modified: trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -35,8 +35,8 @@
{
static final String SSLSocketClass = "javax.net.ssl.SSLSocket";
- static org.apache.juli.logging.Log logger =
- org.apache.juli.logging.LogFactory.getLog(JSSEImplementation.class);
+ static org.jboss.logging.Logger logger =
+ org.jboss.logging.Logger.getLogger(JSSEImplementation.class);
private JSSEFactory factory = null;
Modified: trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -88,8 +88,8 @@
private static final String defaultKeystoreFile
= System.getProperty("user.home") + "/.keystore";
private static final String defaultKeyPass = "changeit";
- static org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(JSSESocketFactory.class);
+ static org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(JSSESocketFactory.class);
protected boolean initialized;
protected String clientAuth = "false";
Modified: trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/apache/tomcat/util/net/jsse/JSSESupport.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -50,8 +50,8 @@
class JSSESupport implements SSLSupport {
- private static org.apache.juli.logging.Log log =
- org.apache.juli.logging.LogFactory.getLog(JSSESupport.class);
+ private static org.jboss.logging.Logger log =
+ org.jboss.logging.Logger.getLogger(JSSESupport.class);
protected SSLSocket ssl;
protected SSLSession session;
Added: trunk/java/org/jboss/logging/DynamicLogger.java
===================================================================
--- trunk/java/org/jboss/logging/DynamicLogger.java (rev 0)
+++ trunk/java/org/jboss/logging/DynamicLogger.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,265 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+/**
+ * An extension of the JBoss Logger that adds a log()
+ * primitive that maps to a dynamically defined log level.
+ *
+ * TODO - Make sure serialization works correctly
+ *
+ * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
+ * @version <tt>$Revision: 2081 $</tt>
+ *
+ * @since 4.0.3
+ */
+public class DynamicLogger extends Logger
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -5963699806863917370L;
+
+ /** No logging */
+ public static final int LOG_LEVEL_NONE = 0;
+
+ /** Fatal level logging */
+ public static final int LOG_LEVEL_FATAL = 1;
+
+ /** Error level logging */
+ public static final int LOG_LEVEL_ERROR = 2;
+
+ /** Warn level logging */
+ public static final int LOG_LEVEL_WARN = 3;
+
+ /** Info level logging */
+ public static final int LOG_LEVEL_INFO = 4;
+
+ /** Debug level logging */
+ public static final int LOG_LEVEL_DEBUG = 5;
+
+ /** Trace level logging */
+ public static final int LOG_LEVEL_TRACE = 6;
+
+ /** The available log level strings */
+ public final static String[] LOG_LEVEL_STRINGS =
+ { "NONE", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" };
+
+ /** The log level to use for the "log" primitive */
+ private int logLevel = LOG_LEVEL_DEBUG;
+
+ /**
+ * Create a DynamicLogger instance given the logger name.
+ *
+ * @param name the logger name
+ * @return the dynamic logger
+ */
+ public static DynamicLogger getDynamicLogger(String name)
+ {
+ return new DynamicLogger(name);
+ }
+
+ /**
+ * Create a DynamicLogger instance given the logger name with the given suffix.
+ *
+ * <p>This will include a logger seperator between classname and suffix
+ *
+ * @param name The logger name
+ * @param suffix A suffix to append to the classname.
+ * @return the dynamic logger
+ */
+ public static DynamicLogger getDynamicLogger(String name, String suffix)
+ {
+ return new DynamicLogger(name + "." + suffix);
+ }
+
+ /**
+ * Create a DynamicLogger instance given the logger class. This simply
+ * calls create(clazz.getName()).
+ *
+ * @param clazz the Class whose name will be used as the logger name
+ * @return the dynamic logger
+ */
+ public static DynamicLogger getDynamicLogger(Class clazz)
+ {
+ return new DynamicLogger(clazz.getName());
+ }
+
+ /**
+ * Create a DynamicLogger instance given the logger class with the given suffix.
+ *
+ * <p>This will include a logger seperator between classname and suffix
+ *
+ * @param clazz The Class whose name will be used as the logger name.
+ * @param suffix A suffix to append to the classname.
+ * @return the dynamic logger
+ */
+ public static DynamicLogger getDynamicLogger(Class clazz, String suffix)
+ {
+ return new DynamicLogger(clazz.getName() + "." + suffix);
+ }
+
+ /**
+ * Create a new DynamicLogger.
+ *
+ * @param name the log name
+ */
+ protected DynamicLogger(final String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Sets the logLevel for the log() primitive
+ *
+ * @param logLevel between LOG_LEVEL_NONE and LOG_LEVEL_TRACE
+ */
+ public void setLogLevel(int logLevel)
+ {
+ if (logLevel >= LOG_LEVEL_NONE && logLevel <= LOG_LEVEL_TRACE)
+ {
+ this.logLevel = logLevel;
+ }
+ }
+
+ /**
+ * Gets the logLevel of the log() primitive
+ *
+ * @return the logLevel of the log() primitive
+ */
+ public int getLogLevel()
+ {
+ return logLevel;
+ }
+
+ /**
+ * Sets the logLevel of the log() primitive
+ *
+ * @param logLevelString the log level in String form
+ */
+ public void setLogLevelAsString(String logLevelString)
+ {
+ if (logLevelString != null)
+ {
+ logLevelString = logLevelString.toUpperCase().trim();
+
+ for (int i = 0; i <= LOG_LEVEL_TRACE; i++)
+ {
+ if (logLevelString.equals(LOG_LEVEL_STRINGS[i]))
+ {
+ // match
+ this.logLevel = i;
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets the logLevel of the log() primitive in String form
+ *
+ * @return the logLevel of the log() primitive in String form
+ */
+ public String getLogLevelAsString()
+ {
+ return LOG_LEVEL_STRINGS[logLevel];
+ }
+
+ /**
+ * Logs a message using dynamic log level
+ *
+ * @param message the message to log
+ */
+ public void log(Object message)
+ {
+ switch (logLevel)
+ {
+ case LOG_LEVEL_TRACE:
+ super.trace(message);
+ break;
+
+ case LOG_LEVEL_DEBUG:
+ super.debug(message);
+ break;
+
+ case LOG_LEVEL_INFO:
+ super.info(message);
+ break;
+
+ case LOG_LEVEL_WARN:
+ super.warn(message);
+ break;
+
+ case LOG_LEVEL_ERROR:
+ super.error(message);
+ break;
+
+ case LOG_LEVEL_FATAL:
+ super.fatal(message);
+ break;
+
+ case LOG_LEVEL_NONE:
+ default:
+ // do nothing
+ break;
+ }
+ }
+
+ /**
+ * Logs a message and a throwable using dynamic log level
+ *
+ * @param message the message to log
+ * @param t the throwable to log
+ */
+ public void log(Object message, Throwable t)
+ {
+ switch (logLevel)
+ {
+ case LOG_LEVEL_TRACE:
+ super.trace(message, t);
+ break;
+
+ case LOG_LEVEL_DEBUG:
+ super.debug(message, t);
+ break;
+
+ case LOG_LEVEL_INFO:
+ super.info(message, t);
+ break;
+
+ case LOG_LEVEL_WARN:
+ super.warn(message, t);
+ break;
+
+ case LOG_LEVEL_ERROR:
+ super.error(message, t);
+ break;
+
+ case LOG_LEVEL_FATAL:
+ super.fatal(message, t);
+ break;
+
+ case LOG_LEVEL_NONE:
+ default:
+ // do nothing
+ break;
+ }
+ }
+}
Property changes on: trunk/java/org/jboss/logging/DynamicLogger.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/Logger.java
===================================================================
--- trunk/java/org/jboss/logging/Logger.java (rev 0)
+++ trunk/java/org/jboss/logging/Logger.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,434 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
+
+/**
+ * Logger wrapper that tries to dynamically load a log4j class to
+ * determine if log4j is available in the VM. If it is the case,
+ * a log4j delegate is built and used. In the contrary, a null
+ * logger is used. This class cannot directly reference log4j
+ * classes otherwise the JVM will try to load it and make it fail.
+ * To set
+ *
+ * <p>Only exposes the relevent factory and logging methods.
+ *
+ * <p>For JBoss the logging should be done as follows:
+ * <ul>
+ * <li>FATAL - JBoss is likely to/will crash
+ * <li>ERROR - A definite problem
+ * <li>WARN - Likely to be a problem, or it could be JBoss
+ * detected a problem it can recover from
+ * <li>INFO - Lifecycle low volume, e.g. "Bound x into jndi",
+ * things that are of interest to a user
+ * <li>DEBUG - Lifecycle low volume but necessarily of interest
+ * to the user, e.g. "Starting listener thread"
+ * <li>TRACE - High volume detailed logging
+ * </ul>
+ *
+ * @see #isTraceEnabled
+ * @see #trace(Object)
+ * @see #trace(Object,Throwable)
+ *
+ * @version <tt>$Revision: 2081 $</tt>
+ * @author Scott.Stark(a)jboss.org
+ * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
+ * @author <a href="mailto:sacha.labourey@cogito-info.ch">Sacha Labourey</a>
+ */
+public class Logger implements Serializable
+{
+ /** Serialization */
+ private static final long serialVersionUID = 4232175575988879434L;
+
+ /** The system property to look for an externalized LoggerPlugin implementation class */
+ protected static String PLUGIN_CLASS_PROP = "org.jboss.logging.Logger.pluginClass";
+
+ /** The default LoggerPlugin implementation is log4j */
+ protected static final String DEFAULT_PLUGIN_CLASS_NAME = "org.jboss.logging.jdk.JDK14LoggerPlugin";
+
+ /** The LoggerPlugin implementation class to use */
+ protected static Class pluginClass = null;
+
+ /** The class name of the LoggerPlugin implementation class to use */
+ protected static String pluginClassName = null;
+
+ static
+ {
+ init();
+ }
+
+ /** The logger name. */
+ private final String name;
+
+ /** The logger plugin delegate */
+ protected transient LoggerPlugin loggerDelegate = null;
+
+ /** The LoggerPlugin implementation class name in use
+ *
+ * @return LoggerPlugin implementation class name
+ */
+ public static String getPluginClassName()
+ {
+ return Logger.pluginClassName;
+ }
+
+ /**
+ * Set the LoggerPlugin implementation class name in use
+ *
+ * @param pluginClassName the LoggerPlugin implementation class name
+ */
+ public static void setPluginClassName(String pluginClassName)
+ {
+ if (pluginClassName.equals(Logger.pluginClassName) == false)
+ {
+ Logger.pluginClassName = pluginClassName;
+ init();
+ }
+ }
+
+ /**
+ * Creates new Logger the given logger name.
+ *
+ * @param name the logger name.
+ */
+ protected Logger(final String name)
+ {
+ this.name = name;
+ this.loggerDelegate = getDelegatePlugin(name);
+ }
+
+ /**
+ * Return the name of this logger.
+ *
+ * @return The name of this logger.
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Get the logger plugin delegate
+ *
+ * @return the delegate
+ */
+ public LoggerPlugin getLoggerPlugin()
+ {
+ return this.loggerDelegate;
+ }
+
+ /**
+ * Check to see if the TRACE level is enabled for this logger.
+ *
+ * @return true if a {@link #trace(Object)} method invocation would pass
+ * the msg to the configured appenders, false otherwise.
+ */
+ public boolean isTraceEnabled()
+ {
+ return loggerDelegate.isTraceEnabled();
+ }
+
+ /**
+ * Issue a log msg with a level of TRACE.
+ *
+ * @param message the message
+ */
+ public void trace(Object message)
+ {
+ loggerDelegate.trace(message);
+ }
+
+ /**
+ * Issue a log msg and throwable with a level of TRACE.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ public void trace(Object message, Throwable t)
+ {
+ loggerDelegate.trace(message, t);
+ }
+
+ /**
+ * Check to see if the DEBUG level is enabled for this logger.
+ *
+ * @deprecated DEBUG is for low volume logging, you don't need this
+ * @return true if a {@link #trace(Object)} method invocation would pass
+ * the msg to the configured appenders, false otherwise.
+ */
+ public boolean isDebugEnabled()
+ {
+ return loggerDelegate.isDebugEnabled();
+ }
+
+ /**
+ * Issue a log msg with a level of DEBUG.
+ *
+ * @param message the message
+ */
+ public void debug(Object message)
+ {
+ loggerDelegate.debug(message);
+ }
+
+ /**
+ * Issue a log msg and throwable with a level of DEBUG.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ public void debug(Object message, Throwable t)
+ {
+ loggerDelegate.debug(message, t);
+ }
+
+ /**
+ * Check to see if the INFO level is enabled for this logger.
+ *
+ * @deprecated INFO is for low volume information, you don't need this
+ * @return true if a {@link #info(Object)} method invocation would pass
+ * the msg to the configured appenders, false otherwise.
+ */
+ public boolean isInfoEnabled()
+ {
+ return loggerDelegate.isInfoEnabled();
+ }
+
+ /**
+ * Issue a log msg with a level of INFO.
+ *
+ * @param message the message
+ */
+ public void info(Object message)
+ {
+ loggerDelegate.info(message);
+ }
+
+ /**
+ * Issue a log msg and throwable with a level of INFO.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ public void info(Object message, Throwable t)
+ {
+ loggerDelegate.info(message, t);
+ }
+
+ /**
+ * Issue a log msg with a level of WARN.
+ *
+ * @param message the message
+ */
+ public void warn(Object message)
+ {
+ loggerDelegate.warn(message);
+ }
+
+ /**
+ * Issue a log msg and throwable with a level of WARN.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ public void warn(Object message, Throwable t)
+ {
+ loggerDelegate.warn(message, t);
+ }
+
+ /**
+ * Issue a log msg with a level of ERROR.
+ *
+ * @param message the message
+ */
+ public void error(Object message)
+ {
+ loggerDelegate.error(message);
+ }
+
+ /**
+ * Issue a log msg and throwable with a level of ERROR.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ public void error(Object message, Throwable t)
+ {
+ loggerDelegate.error(message, t);
+ }
+
+ /**
+ * Issue a log msg with a level of FATAL.
+ *
+ * @param message the message
+ */
+ public void fatal(Object message)
+ {
+ loggerDelegate.fatal(message);
+ }
+
+ /**
+ * Issue a log msg and throwable with a level of FATAL.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ public void fatal(Object message, Throwable t)
+ {
+ loggerDelegate.fatal(message, t);
+ }
+
+ /**
+ * Custom serialization to reinitalize the delegate
+ *
+ * @param stream the object stream
+ * @throws IOException for any error
+ * @throws ClassNotFoundException if a class is not found during deserialization
+ */
+ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
+ {
+ // restore non-transient fields (aka name)
+ stream.defaultReadObject();
+
+ // Restore logging
+ if (pluginClass == null)
+ {
+ init();
+ }
+ this.loggerDelegate = getDelegatePlugin(name);
+ }
+
+ /**
+ * Create a Logger instance given the logger name.
+ *
+ * @param name the logger name
+ * @return the logger
+ */
+ public static Logger getLogger(String name)
+ {
+ return new Logger(name);
+ }
+
+ /**
+ * Create a Logger instance given the logger name with the given suffix.
+ *
+ * <p>This will include a logger seperator between classname and suffix
+ *
+ * @param name the logger name
+ * @param suffix a suffix to append to the classname.
+ * @return the logger
+ */
+ public static Logger getLogger(String name, String suffix)
+ {
+ return new Logger(name + "." + suffix);
+ }
+
+ /**
+ * Create a Logger instance given the logger class. This simply
+ * calls create(clazz.getName()).
+ *
+ * @param clazz the Class whose name will be used as the logger name
+ * @return the logger
+ */
+ public static Logger getLogger(Class clazz)
+ {
+ return new Logger(clazz.getName());
+ }
+
+ /**
+ * Create a Logger instance given the logger class with the given suffix.
+ *
+ * <p>This will include a logger seperator between classname and suffix
+ *
+ * @param clazz the Class whose name will be used as the logger name.
+ * @param suffix a suffix to append to the classname.
+ * @return the logger
+ */
+ public static Logger getLogger(Class clazz, String suffix)
+ {
+ return new Logger(clazz.getName() + "." + suffix);
+ }
+
+ /**
+ * Get the delegate plugin
+ *
+ * @param name the name of the logger
+ * @return the plugin
+ */
+ protected static LoggerPlugin getDelegatePlugin(String name)
+ {
+ LoggerPlugin plugin = null;
+ try
+ {
+ plugin = (LoggerPlugin) pluginClass.newInstance();
+ }
+ catch (Throwable e)
+ {
+ plugin = new NullLoggerPlugin();
+ }
+ try
+ {
+ plugin.init(name);
+ }
+ catch (Throwable e)
+ {
+ String extraInfo = e.getMessage();
+ System.err.println("Failed to initalize plugin: " + plugin
+ + (extraInfo != null ? ", cause: " + extraInfo : ""));
+ plugin = new NullLoggerPlugin();
+ }
+
+ return plugin;
+ }
+
+ /**
+ * Initialize the LoggerPlugin class to use as the delegate to the
+ * logging system. This first checks to see if a pluginClassName has
+ * been specified via the {@link #setPluginClassName(String)} method,
+ * then the PLUGIN_CLASS_PROP system property and finally the
+ * LOG4J_PLUGIN_CLASS_NAME default. If the LoggerPlugin implementation
+ * class cannot be loaded the default NullLoggerPlugin will be used.
+ */
+ protected static void init()
+ {
+ try
+ {
+ // See if there is a PLUGIN_CLASS_PROP specified
+ if (pluginClassName == null)
+ {
+ pluginClassName = System.getProperty(PLUGIN_CLASS_PROP, DEFAULT_PLUGIN_CLASS_NAME);
+ }
+
+ // Try to load the plugin via the TCL
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ pluginClass = cl.loadClass(pluginClassName);
+ }
+ catch (Throwable e)
+ {
+ // The plugin could not be setup, default to a null logger
+ pluginClass = org.jboss.logging.NullLoggerPlugin.class;
+ }
+ }
+}
Property changes on: trunk/java/org/jboss/logging/Logger.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/LoggerPlugin.java
===================================================================
--- trunk/java/org/jboss/logging/LoggerPlugin.java (rev 0)
+++ trunk/java/org/jboss/logging/LoggerPlugin.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+/**
+ * Defines a "pluggable" login module. In fact, this is only used to split between
+ * log4j and /dev/null. Choice is made in org.jboss.logging.Logger
+ *
+ * @see org.jboss.logging.Logger
+ * @see org.jboss.logging.NullLoggerPlugin
+ *
+ * @author <a href="mailto:sacha.labourey@cogito-info.ch">Sacha Labourey</a>.
+ * @version $Revision: 2081 $
+ */
+public interface LoggerPlugin
+{
+ /**
+ * Initialise the logger with the given name
+ *
+ * @param name the name
+ */
+ void init(String name);
+
+ /**
+ * Check to see if the TRACE level is enabled for this logger.
+ *
+ * @return true if a {@link #trace(Object)} method invocation would pass
+ * the msg to the configured appenders, false otherwise.
+ */
+ boolean isTraceEnabled();
+
+ /**
+ * Issue a log msg with a level of TRACE.
+ *
+ * @param message the message
+ */
+ void trace(Object message);
+
+ /**
+ * Issue a log msg and throwable with a level of TRACE.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ void trace(Object message, Throwable t);
+
+ /**
+ * Check to see if the DEBUG level is enabled for this logger.
+ *
+ * @deprecated DEBUG is for low volume logging, you don't need this
+ * @return true if a {@link #trace(Object)} method invocation would pass
+ * the msg to the configured appenders, false otherwise.
+ */
+ boolean isDebugEnabled();
+
+ /**
+ * Issue a log msg with a level of DEBUG.
+ *
+ * @param message the message
+ */
+ void debug(Object message);
+
+ /**
+ * Issue a log msg and throwable with a level of DEBUG.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ void debug(Object message, Throwable t);
+
+ /**
+ * Check to see if the INFO level is enabled for this logger.
+ *
+ * @deprecated INFO is for low volume information, you don't need this
+ * @return true if a {@link #info(Object)} method invocation would pass
+ * the msg to the configured appenders, false otherwise.
+ */
+ boolean isInfoEnabled();
+
+ /**
+ * Issue a log msg with a level of INFO.
+ *
+ * @param message the message
+ */
+ void info(Object message);
+
+ /**
+ * Issue a log msg and throwable with a level of INFO.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ void info(Object message, Throwable t);
+
+ /**
+ * Issue a log msg with a level of WARN.
+ *
+ * @param message the message
+ */
+ void warn(Object message);
+
+ /**
+ * Issue a log msg and throwable with a level of WARN.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ void warn(Object message, Throwable t);
+
+ /**
+ * Issue a log msg with a level of ERROR.
+ *
+ * @param message the message
+ */
+ void error(Object message);
+
+ /**
+ * Issue a log msg and throwable with a level of ERROR.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ void error(Object message, Throwable t);
+
+ /**
+ * Issue a log msg with a level of FATAL.
+ *
+ * @param message the message
+ */
+ void fatal(Object message);
+
+ /**
+ * Issue a log msg and throwable with a level of FATAL.
+ *
+ * @param message the message
+ * @param t the throwable
+ */
+ void fatal(Object message, Throwable t);
+}
Property changes on: trunk/java/org/jboss/logging/LoggerPlugin.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/MDC.java
===================================================================
--- trunk/java/org/jboss/logging/MDC.java (rev 0)
+++ trunk/java/org/jboss/logging/MDC.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.util.Map;
+
+/**
+ * A "Map Diagnostic Context" abstraction.
+ *
+ * @author Jason T. Greene
+ */
+public class MDC
+{
+ private final static MDCProvider mdc;
+
+ static
+ {
+ MDCProvider m = null;
+ if (NDCSupport.class.isAssignableFrom(Logger.pluginClass))
+ {
+
+ try
+ {
+ m = ((MDCSupport) Logger.pluginClass.newInstance()).getMDCProvider();
+ }
+ catch (Throwable t)
+ {
+ // Eat
+ }
+ }
+
+ if (m == null)
+ m = new NullMDCProvider();
+
+ mdc = m;
+ }
+
+ public static void put(String key, Object val)
+ {
+ mdc.put(key, val);
+ }
+
+ public static Object get(String key)
+ {
+ return mdc.get(key);
+ }
+
+ public static void remove(String key)
+ {
+ mdc.remove(key);
+ }
+
+ public static Map<String, Object> getMap()
+ {
+ return mdc.getMap();
+ }
+}
Property changes on: trunk/java/org/jboss/logging/MDC.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/MDCProvider.java
===================================================================
--- trunk/java/org/jboss/logging/MDCProvider.java (rev 0)
+++ trunk/java/org/jboss/logging/MDCProvider.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.util.Map;
+
+/**
+ * MDC SPI for the backend logging implementation.
+ *
+ * @author Jason T. Greene
+ */
+public interface MDCProvider
+{
+ public void put(String key, Object value);
+
+ public Object get(String key);
+
+ public void remove(String key);
+
+ public Map<String, Object> getMap();
+}
Property changes on: trunk/java/org/jboss/logging/MDCProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/MDCSupport.java
===================================================================
--- trunk/java/org/jboss/logging/MDCSupport.java (rev 0)
+++ trunk/java/org/jboss/logging/MDCSupport.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+/**
+ * Indicates that a Logger plugin supports MDC.
+ *
+ * @author Jason T. Greene
+ */
+public interface MDCSupport
+{
+ public MDCProvider getMDCProvider();
+}
Property changes on: trunk/java/org/jboss/logging/MDCSupport.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/NDC.java
===================================================================
--- trunk/java/org/jboss/logging/NDC.java (rev 0)
+++ trunk/java/org/jboss/logging/NDC.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+
+/**
+ * A "Nested Diagnostic Context" abstraction.
+ *
+ * @author Jason T. Greene
+ */
+public class NDC
+{
+ private final static NDCProvider ndc;
+
+ static
+ {
+ NDCProvider n = null;
+ if (NDCSupport.class.isAssignableFrom(Logger.pluginClass))
+ {
+
+ try
+ {
+ n = ((NDCSupport) Logger.pluginClass.newInstance()).getNDCProvider();
+ }
+ catch (Throwable t)
+ {
+ // Eat
+ }
+ }
+
+ if (n == null)
+ n = new NullNDCProvider();
+
+ ndc = n;
+ }
+
+ public static void clear()
+ {
+ ndc.clear();
+ }
+
+ public static String get()
+ {
+ return ndc.get();
+ }
+
+ public static int getDepth()
+ {
+ return ndc.getDepth();
+ }
+
+ public static String pop()
+ {
+ return ndc.pop();
+ }
+
+ public static String peek()
+ {
+ return ndc.peek();
+ }
+
+ public static void push(String message)
+ {
+ ndc.push(message);
+ }
+
+ public static void setMaxDepth(int maxDepth)
+ {
+ ndc.setMaxDepth(maxDepth);
+ }
+}
Property changes on: trunk/java/org/jboss/logging/NDC.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/NDCProvider.java
===================================================================
--- trunk/java/org/jboss/logging/NDCProvider.java (rev 0)
+++ trunk/java/org/jboss/logging/NDCProvider.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+
+/**
+ * An NDC SPI for the backend logging implementation.
+ *
+ * @author Jason T. Greene
+ */
+public interface NDCProvider
+{
+ public void clear();
+
+ public String get();
+
+ public int getDepth();
+
+ public String pop();
+
+ public String peek();
+
+ public void push(String message);
+
+ public void setMaxDepth(int maxDepth);
+}
\ No newline at end of file
Property changes on: trunk/java/org/jboss/logging/NDCProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/NDCSupport.java
===================================================================
--- trunk/java/org/jboss/logging/NDCSupport.java (rev 0)
+++ trunk/java/org/jboss/logging/NDCSupport.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+/**
+ * Indicates that a logger plugin supports NDC.
+ *
+ * @author Jason T. Greene
+ */
+public interface NDCSupport
+{
+ public NDCProvider getNDCProvider();
+}
Property changes on: trunk/java/org/jboss/logging/NDCSupport.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/NullLoggerPlugin.java
===================================================================
--- trunk/java/org/jboss/logging/NullLoggerPlugin.java (rev 0)
+++ trunk/java/org/jboss/logging/NullLoggerPlugin.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+/**
+ * LoggerPlugin implementation producing no output at all. Used for client
+ * side logging when no log4j.jar is available on the classpath.
+ *
+ * @see org.jboss.logging.Logger
+ * @see org.jboss.logging.LoggerPlugin
+ *
+ * @author <a href="mailto:sacha.labourey@cogito-info.ch">Sacha Labourey</a>.
+ * @version $Revision: 2081 $
+ */
+public class NullLoggerPlugin implements LoggerPlugin
+{
+ public void init(String name)
+ {
+ /* don't care */
+ }
+
+ public boolean isTraceEnabled()
+ {
+ return false;
+ }
+
+ public void trace(Object message)
+ {
+ // nothing
+ }
+
+ public void trace(Object message, Throwable t)
+ {
+ // nothing
+ }
+
+ public boolean isDebugEnabled()
+ {
+ return false;
+ }
+
+ public void debug(Object message)
+ {
+ // nothing
+ }
+
+ public void debug(Object message, Throwable t)
+ {
+ // nothing
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return false;
+ }
+
+ public void info(Object message)
+ {
+ // nothing
+ }
+
+ public void info(Object message, Throwable t)
+ {
+ // nothing
+ }
+
+ public void error(Object message)
+ {
+ // nothing
+ }
+
+ public void error(Object message, Throwable t)
+ {
+ // nothing
+ }
+
+ public void fatal(Object message)
+ {
+ // nothing
+ }
+
+ public void fatal(Object message, Throwable t)
+ {
+ // nothing
+ }
+
+ public void warn(Object message)
+ {
+ // nothing
+ }
+
+ public void warn(Object message, Throwable t)
+ {
+ // nothing
+ }
+}
Property changes on: trunk/java/org/jboss/logging/NullLoggerPlugin.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/NullMDCProvider.java
===================================================================
--- trunk/java/org/jboss/logging/NullMDCProvider.java (rev 0)
+++ trunk/java/org/jboss/logging/NullMDCProvider.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.util.Map;
+
+/**
+ * An MDC provider which does nothing.
+ *
+ * @author Jason T. Greene
+ */
+public class NullMDCProvider implements MDCProvider
+{
+ public Object get(String key)
+ {
+ return null;
+ }
+
+ public Map<String, Object> getMap()
+ {
+ return null;
+ }
+
+ public void put(String key, Object val)
+ {
+ }
+
+ public void remove(String key)
+ {
+ }
+}
\ No newline at end of file
Property changes on: trunk/java/org/jboss/logging/NullMDCProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/NullNDCProvider.java
===================================================================
--- trunk/java/org/jboss/logging/NullNDCProvider.java (rev 0)
+++ trunk/java/org/jboss/logging/NullNDCProvider.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.util.Stack;
+
+/**
+ * An NDC provider which does nothing.
+ *
+ * @author Jason T. Greene
+ */
+public class NullNDCProvider implements NDCProvider
+{
+ public void clear()
+ {
+ }
+
+ public Stack cloneStack()
+ {
+ return null;
+ }
+
+ public String get()
+ {
+ return null;
+ }
+
+ public int getDepth()
+ {
+ return 0;
+ }
+
+ public void inherit(Stack stack)
+ {
+ }
+
+ public String peek()
+ {
+ return null;
+ }
+
+ public String pop()
+ {
+ return null;
+ }
+
+ public void push(String message)
+ {
+ }
+
+ public void remove()
+ {
+ }
+
+ public void setMaxDepth(int maxDepth)
+ {
+ }
+}
Property changes on: trunk/java/org/jboss/logging/NullNDCProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java
===================================================================
--- trunk/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java (rev 0)
+++ trunk/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,154 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.jdk;
+
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+import org.jboss.logging.LoggerPlugin;
+import org.jboss.logging.MDCProvider;
+import org.jboss.logging.MDCSupport;
+import org.jboss.logging.NDCProvider;
+import org.jboss.logging.NDCSupport;
+
+/** An example LoggerPlugin which uses the JDK java.util.logging framework.
+ *
+ * @author Scott.Stark(a)jboss.org
+ * @version $Revison:$
+ */
+public class JDK14LoggerPlugin implements LoggerPlugin, MDCSupport, NDCSupport
+{
+ private Logger log;
+
+ public void init(String name)
+ {
+ log = Logger.getLogger(name);
+ }
+
+ public boolean isTraceEnabled()
+ {
+ return log.isLoggable(Level.FINER);
+ }
+
+ public void trace(Object message)
+ {
+ log(Level.FINER, String.valueOf(message), null);
+ }
+
+ public void trace(Object message, Throwable t)
+ {
+ log(Level.FINER, String.valueOf(message), t);
+ }
+
+ public boolean isDebugEnabled()
+ {
+ return log.isLoggable(Level.FINE);
+ }
+
+ public void debug(Object message)
+ {
+ log(Level.FINE, String.valueOf(message), null);
+ }
+
+ public void debug(Object message, Throwable t)
+ {
+ log(Level.FINE, String.valueOf(message), t);
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return log.isLoggable(Level.INFO);
+ }
+
+ public void info(Object message)
+ {
+ log(Level.INFO, String.valueOf(message), null);
+ }
+
+ public void info(Object message, Throwable t)
+ {
+ log(Level.INFO, String.valueOf(message), t);
+ }
+
+ public void warn(Object message)
+ {
+ log(Level.WARNING, String.valueOf(message), null);
+ }
+
+ public void warn(Object message, Throwable t)
+ {
+ log(Level.WARNING, String.valueOf(message), t);
+ }
+
+ public void error(Object message)
+ {
+ log(Level.SEVERE, String.valueOf(message), null);
+ }
+
+ public void error(Object message, Throwable t)
+ {
+ log(Level.SEVERE, String.valueOf(message), t);
+ }
+
+ public void fatal(Object message)
+ {
+ log(Level.SEVERE, String.valueOf(message), null);
+ }
+
+ public void fatal(Object message, Throwable t)
+ {
+ log(Level.SEVERE, String.valueOf(message), t);
+ }
+
+ // From commons-logging
+ private void log(Level level, String msg, Throwable ex) {
+ if (log.isLoggable(level)) {
+ // Get the stack trace.
+ Throwable dummyException = new Throwable();
+ StackTraceElement locations[] = dummyException.getStackTrace();
+ // Caller will be the third element
+ String cname = "unknown";
+ String method = "unknown";
+ if (locations != null && locations.length > 3) {
+ StackTraceElement caller = locations[3];
+ cname = caller.getClassName();
+ method = caller.getMethodName();
+ }
+ if (ex == null) {
+ log.logp(level, cname, method, msg);
+ } else {
+ log.logp(level, cname, method, msg, ex);
+ }
+ }
+ }
+
+ public NDCProvider getNDCProvider()
+ {
+ return new JDKNDCProvider();
+ }
+
+ public MDCProvider getMDCProvider()
+ {
+ return new JDKMDCProvider();
+ }
+}
Property changes on: trunk/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/jdk/JDKMDCProvider.java
===================================================================
--- trunk/java/org/jboss/logging/jdk/JDKMDCProvider.java (rev 0)
+++ trunk/java/org/jboss/logging/jdk/JDKMDCProvider.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging.jdk;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.logging.MDCProvider;
+
+/**
+ * MDC implementation for JDK logging.
+ *
+ * @author Jason T. Greene
+ */
+public class JDKMDCProvider implements MDCProvider
+{
+ private ThreadLocal<Map<String, Object>> map = new ThreadLocal<Map<String, Object>>();
+
+ public Object get(String key)
+ {
+ return map.get() == null ? null : map.get().get(key);
+ }
+
+ public Map<String, Object> getMap()
+ {
+ return map.get();
+ }
+
+ public void put(String key, Object value)
+ {
+ Map<String, Object> map = this.map.get();
+ if (map == null)
+ {
+ map = new HashMap<String, Object>();
+ this.map.set(map);
+ }
+
+ map.put(key, value);
+ }
+
+ public void remove(String key)
+ {
+ Map<String, Object> map = this.map.get();
+ if (map == null)
+ return;
+
+ map.remove(key);
+ }
+}
\ No newline at end of file
Property changes on: trunk/java/org/jboss/logging/jdk/JDKMDCProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/java/org/jboss/logging/jdk/JDKNDCProvider.java
===================================================================
--- trunk/java/org/jboss/logging/jdk/JDKNDCProvider.java (rev 0)
+++ trunk/java/org/jboss/logging/jdk/JDKNDCProvider.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging.jdk;
+
+import java.util.ArrayList;
+import java.util.EmptyStackException;
+import java.util.Stack;
+
+import org.jboss.logging.NDCProvider;
+
+/**
+ * NDC implementation for JDK logging
+ *
+ * @author Jason T. Greene
+ */
+public class JDKNDCProvider implements NDCProvider
+{
+ private class ArrayStack<E> extends ArrayList<E>
+ {
+ private static final long serialVersionUID = -8520038422243642840L;
+
+ public E pop()
+ {
+ int size = size();
+ if (size == 0)
+ throw new EmptyStackException();
+
+ return remove(size - 1);
+ }
+
+ public E peek()
+ {
+ int size = size();
+ if (size == 0)
+ throw new EmptyStackException();
+
+ return get(size - 1);
+ }
+
+ public void push(E val)
+ {
+ add(val);
+ }
+
+ public void setSize(int newSize)
+ {
+ int size = size();
+ if (newSize >= size || newSize < 0)
+ return;
+
+ removeRange(newSize, size);
+ }
+ }
+
+ private class Entry
+ {
+ private String merged;
+ private String current;
+
+ public Entry(String current)
+ {
+ this.merged = current;
+ this.current = current;
+ }
+
+ public Entry(Entry parent, String current)
+ {
+ this.merged = parent.merged + ' ' + current;
+ this.current = current;
+ }
+ }
+
+ private ThreadLocal<ArrayStack<Entry>> stack = new ThreadLocal<ArrayStack<Entry>>();
+
+ public void clear()
+ {
+ ArrayStack<Entry> stack = this.stack.get();
+ if (stack != null)
+ stack.clear();
+ }
+
+ public String get()
+ {
+ ArrayStack<Entry> stack = this.stack.get();
+
+ return stack == null || stack.isEmpty() ? null : stack.peek().merged;
+ }
+
+ public int getDepth()
+ {
+ ArrayStack<Entry> stack = this.stack.get();
+
+ return stack == null ? 0 : stack.size();
+ }
+
+ public String peek()
+ {
+ ArrayStack<Entry> stack = this.stack.get();
+
+ return stack == null || stack.isEmpty() ? "" : stack.peek().current;
+ }
+
+ public String pop()
+ {
+ ArrayStack<Entry> stack = this.stack.get();
+
+ return stack == null || stack.isEmpty() ? "" : stack.pop().current;
+ }
+
+ public void push(String message)
+ {
+ ArrayStack<Entry> stack = this.stack.get();
+
+ if (stack == null)
+ {
+ stack = new ArrayStack<Entry>();
+ this.stack.set(stack);
+ }
+
+ stack.push(stack.isEmpty() ? new Entry(message) : new Entry(stack.peek(), message));
+ }
+
+ public void setMaxDepth(int maxDepth)
+ {
+ ArrayStack<Entry> stack = this.stack.get();
+
+ if (stack != null)
+ stack.setSize(maxDepth);
+ }
+}
Property changes on: trunk/java/org/jboss/logging/jdk/JDKNDCProvider.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/java/org/jboss/web/php/LifecycleListener.java
===================================================================
--- trunk/java/org/jboss/web/php/LifecycleListener.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/jboss/web/php/LifecycleListener.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -26,8 +26,8 @@
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.util.StringManager;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
* Implementation of <code>LifecycleListener</code> that will init and
@@ -41,7 +41,7 @@
public class LifecycleListener
implements org.apache.catalina.LifecycleListener {
- private static Log log = LogFactory.getLog(LifecycleListener.class);
+ private static Logger log = Logger.getLogger(LifecycleListener.class);
/**
* The string manager for this package.
Modified: trunk/java/org/jboss/web/php/ScriptEnvironment.java
===================================================================
--- trunk/java/org/jboss/web/php/ScriptEnvironment.java 2007-08-10 16:07:23 UTC (rev 221)
+++ trunk/java/org/jboss/web/php/ScriptEnvironment.java 2007-08-10 16:16:57 UTC (rev 222)
@@ -38,8 +38,8 @@
import org.apache.catalina.Globals;
import org.apache.catalina.util.IOTools;
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger;
/**
@@ -52,7 +52,7 @@
*/
public class ScriptEnvironment {
- private static Log log = LogFactory.getLog(ScriptEnvironment.class);
+ private static Logger log = Logger.getLogger(ScriptEnvironment.class);
/**
* The Request attribute key for the client certificate chain.
17 years, 7 months
JBossWeb SVN: r221 - trunk.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-10 12:07:23 -0400 (Fri, 10 Aug 2007)
New Revision: 221
Modified:
trunk/build.xml
Log:
- Switch to JBoss logging: packaging update.
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2007-08-09 16:56:34 UTC (rev 220)
+++ trunk/build.xml 2007-08-10 16:07:23 UTC (rev 221)
@@ -190,6 +190,7 @@
<jar jarfile="${tomcat-juli.jar}">
<fileset dir="${tomcat.classes}">
<include name="org/apache/juli/**" />
+ <include name="org/jboss/logging/**" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
@@ -203,7 +204,7 @@
<include name="org/apache/catalina/**" />
<include name="org/apache/comet/**" />
<include name="org/apache/naming/**" />
- <include name="org/jboss/**" />
+ <include name="org/jboss/web/**" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
@@ -284,7 +285,6 @@
<jar jarfile="${tomcat.build}/lib/servlets-php.jar" index="true">
<fileset dir="${tomcat.classes}">
<include name="org/jboss/web/php/**" />
- <include name="org/apache/juli/**" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
17 years, 7 months
JBossWeb SVN: r220 - trunk/java/org/apache/coyote/ajp.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-09 12:56:34 -0400 (Thu, 09 Aug 2007)
New Revision: 220
Modified:
trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
Log:
- Forgot this one.
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2007-08-09 16:48:46 UTC (rev 219)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2007-08-09 16:56:34 UTC (rev 220)
@@ -137,22 +137,6 @@
/**
- * Set a property.
- */
- public void setProperty(String name, String value) {
- setAttribute(name, value);
- }
-
-
- /**
- * Get a property
- */
- public String getProperty(String name) {
- return (String) getAttribute(name);
- }
-
-
- /**
* The adapter, used to call the connector
*/
public void setAdapter(Adapter adapter) {
17 years, 7 months
JBossWeb SVN: r219 - in trunk/java/org/apache: catalina/startup and 4 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-09 12:48:46 -0400 (Thu, 09 Aug 2007)
New Revision: 219
Removed:
trunk/java/org/apache/catalina/startup/ClusterRuleSetFactory.java
Modified:
trunk/java/org/apache/catalina/connector/Connector.java
trunk/java/org/apache/catalina/startup/Catalina.java
trunk/java/org/apache/catalina/startup/Embedded.java
trunk/java/org/apache/catalina/startup/SetAllPropertiesRule.java
trunk/java/org/apache/catalina/startup/SetContextPropertiesRule.java
trunk/java/org/apache/coyote/ajp/AjpProtocol.java
trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
trunk/java/org/apache/coyote/http11/Http11Protocol.java
trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
trunk/java/org/apache/tomcat/util/digester/Digester.java
trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java
trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java
Log:
- Remove cluster ruleset for now.
- Add simple validation for server.xml (will log WARN if elements or attributes which are not defined in the rules or
on the objects are used in the XML).
Modified: trunk/java/org/apache/catalina/connector/Connector.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Connector.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/catalina/connector/Connector.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -318,6 +318,20 @@
if (replacements.get(name) != null) {
repl = (String) replacements.get(name);
}
+ if (!IntrospectionUtils.setProperty(protocolHandler, repl, value)) {
+ log.warn("Property " + name + " not found on the protocol handler.");
+ }
+ }
+
+
+ /**
+ * Set a configured property.
+ */
+ public void setPropertyInternal(String name, String value) {
+ String repl = name;
+ if (replacements.get(name) != null) {
+ repl = (String) replacements.get(name);
+ }
IntrospectionUtils.setProperty(protocolHandler, repl, value);
}
@@ -388,7 +402,7 @@
public void setAllowTrace(boolean allowTrace) {
this.allowTrace = allowTrace;
- setProperty("allowTrace", String.valueOf(allowTrace));
+ setPropertyInternal("allowTrace", String.valueOf(allowTrace));
}
@@ -466,7 +480,7 @@
public void setEmptySessionPath(boolean emptySessionPath) {
this.emptySessionPath = emptySessionPath;
- setProperty("emptySessionPath", String.valueOf(emptySessionPath));
+ setPropertyInternal("emptySessionPath", String.valueOf(emptySessionPath));
}
@@ -489,7 +503,7 @@
public void setEnableLookups(boolean enableLookups) {
this.enableLookups = enableLookups;
- setProperty("enableLookups", String.valueOf(enableLookups));
+ setPropertyInternal("enableLookups", String.valueOf(enableLookups));
}
@@ -559,7 +573,7 @@
public void setMaxSavePostSize(int maxSavePostSize) {
this.maxSavePostSize = maxSavePostSize;
- setProperty("maxSavePostSize", String.valueOf(maxSavePostSize));
+ setPropertyInternal("maxSavePostSize", String.valueOf(maxSavePostSize));
}
@@ -581,7 +595,7 @@
public void setPort(int port) {
this.port = port;
- setProperty("port", String.valueOf(port));
+ setPropertyInternal("port", String.valueOf(port));
}
@@ -745,7 +759,7 @@
if(proxyName != null && proxyName.length() > 0) {
this.proxyName = proxyName;
- setProperty("proxyName", proxyName);
+ setPropertyInternal("proxyName", proxyName);
} else {
this.proxyName = null;
removeProperty("proxyName");
@@ -772,7 +786,7 @@
public void setProxyPort(int proxyPort) {
this.proxyPort = proxyPort;
- setProperty("proxyPort", String.valueOf(proxyPort));
+ setPropertyInternal("proxyPort", String.valueOf(proxyPort));
}
@@ -797,7 +811,7 @@
public void setRedirectPort(int redirectPort) {
this.redirectPort = redirectPort;
- setProperty("redirectPort", String.valueOf(redirectPort));
+ setPropertyInternal("redirectPort", String.valueOf(redirectPort));
}
@@ -846,7 +860,7 @@
public void setSecure(boolean secure) {
this.secure = secure;
- setProperty("secure", Boolean.toString(secure));
+ setPropertyInternal("secure", Boolean.toString(secure));
}
/**
@@ -867,7 +881,7 @@
public void setURIEncoding(String URIEncoding) {
this.URIEncoding = URIEncoding;
- setProperty("uRIEncoding", URIEncoding);
+ setPropertyInternal("uRIEncoding", URIEncoding);
}
@@ -890,7 +904,7 @@
public void setUseBodyEncodingForURI(boolean useBodyEncodingForURI) {
this.useBodyEncodingForURI = useBodyEncodingForURI;
- setProperty
+ setPropertyInternal
("useBodyEncodingForURI", String.valueOf(useBodyEncodingForURI));
}
@@ -918,7 +932,7 @@
*/
public void setXpoweredBy(boolean xpoweredBy) {
this.xpoweredBy = xpoweredBy;
- setProperty("xpoweredBy", String.valueOf(xpoweredBy));
+ setPropertyInternal("xpoweredBy", String.valueOf(xpoweredBy));
}
/**
@@ -929,7 +943,7 @@
*/
public void setUseIPVHosts(boolean useIPVHosts) {
this.useIPVHosts = useIPVHosts;
- setProperty("useIPVHosts", String.valueOf(useIPVHosts));
+ setPropertyInternal("useIPVHosts", String.valueOf(useIPVHosts));
}
/**
Modified: trunk/java/org/apache/catalina/startup/Catalina.java
===================================================================
--- trunk/java/org/apache/catalina/startup/Catalina.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/catalina/startup/Catalina.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -25,6 +25,10 @@
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
import org.apache.catalina.Container;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleException;
@@ -260,6 +264,12 @@
// Initialize the digester
Digester digester = new Digester();
digester.setValidating(false);
+ digester.setRulesValidation(true);
+ HashMap<Class, List<String>> fakeAttributes = new HashMap<Class, List<String>>();
+ ArrayList<String> attrs = new ArrayList<String>();
+ attrs.add("className");
+ fakeAttributes.put(Object.class, attrs);
+ digester.setFakeAttributes(fakeAttributes);
digester.setClassLoader(StandardServer.class.getClassLoader());
// Configure the actions we will be using
@@ -321,9 +331,7 @@
"addConnector",
"org.apache.catalina.connector.Connector");
-
-
digester.addObjectCreate("Server/Service/Connector/Listener",
null, // MUST be specified in the element
"className");
@@ -337,13 +345,11 @@
digester.addRuleSet(new EngineRuleSet("Server/Service/"));
digester.addRuleSet(new HostRuleSet("Server/Service/Engine/"));
digester.addRuleSet(new ContextRuleSet("Server/Service/Engine/Host/"));
- digester.addRuleSet(ClusterRuleSetFactory.getClusterRuleSet("Server/Service/Engine/Host/Cluster/"));
digester.addRuleSet(new NamingRuleSet("Server/Service/Engine/Host/Context/"));
// When the 'engine' is found, set the parentClassLoader.
digester.addRule("Server/Service/Engine",
new SetParentClassLoaderRule(parentClassLoader));
- digester.addRuleSet(ClusterRuleSetFactory.getClusterRuleSet("Server/Service/Engine/Cluster/"));
long t2=System.currentTimeMillis();
if (log.isDebugEnabled())
Deleted: trunk/java/org/apache/catalina/startup/ClusterRuleSetFactory.java
===================================================================
--- trunk/java/org/apache/catalina/startup/ClusterRuleSetFactory.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/catalina/startup/ClusterRuleSetFactory.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -1,205 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.apache.catalina.startup;
-
-
-import org.apache.tomcat.util.digester.Digester;
-import org.apache.tomcat.util.digester.RuleSetBase;
-import java.lang.reflect.Constructor;
-
-import org.apache.juli.logging.Log;
-import org.apache.juli.logging.LogFactory;
-
-import java.lang.reflect.InvocationTargetException;
-public class ClusterRuleSetFactory {
-
- public static Log log = LogFactory.getLog(ClusterRuleSetFactory.class);
-
- public static RuleSetBase getClusterRuleSet(String prefix) {
-
- //OLD CLUSTER 1
- //first try the same classloader as this class server/lib
- try {
- return loadRuleSet(prefix,"org.apache.catalina.cluster.ClusterRuleSet",ClusterRuleSetFactory.class.getClassLoader());
- } catch ( Exception x ) {
- //display warning
- if ( log.isDebugEnabled() ) log.debug("Unable to load ClusterRuleSet (org.apache.catalina.cluster.ClusterRuleSet), falling back on context classloader");
- }
- //try to load it from the context class loader
- try {
- return loadRuleSet(prefix,"org.apache.catalina.cluster.ClusterRuleSet",Thread.currentThread().getContextClassLoader());
- } catch ( Exception x ) {
- //display warning
- if ( log.isDebugEnabled() ) log.debug("Unable to load ClusterRuleSet (org.apache.catalina.cluster.ClusterRuleSet), will try to load the HA cluster");
- }
-
- //NEW CLUSTER 2
- //first try the same classloader as this class server/lib
- try {
- return loadRuleSet(prefix,"org.apache.catalina.ha.ClusterRuleSet",ClusterRuleSetFactory.class.getClassLoader());
- } catch ( Exception x ) {
- //display warning
- if ( log.isDebugEnabled() ) log.debug("Unable to load HA ClusterRuleSet (org.apache.catalina.ha.ClusterRuleSet), falling back on context classloader");
- }
- //try to load it from the context class loader
- try {
- return loadRuleSet(prefix,"org.apache.catalina.ha.ClusterRuleSet",Thread.currentThread().getContextClassLoader());
- } catch ( Exception x ) {
- //display warning
- if ( log.isDebugEnabled() ) log.debug("Unable to load HA ClusterRuleSet (org.apache.catalina.ha.ClusterRuleSet), falling back on DefaultClusterRuleSet");
- }
-
- log.info("Unable to find a cluster rule set in the classpath. Will load the default rule set.");
- return new DefaultClusterRuleSet(prefix);
- }
-
-
- protected static RuleSetBase loadRuleSet(String prefix, String className, ClassLoader cl)
- throws ClassNotFoundException, InstantiationException,
- NoSuchMethodException,IllegalAccessException,
- InvocationTargetException {
- Class clazz = Class.forName(className,true,cl);
- Constructor cons = clazz.getConstructor(new Class[] {String.class});
- return (RuleSetBase)cons.newInstance(prefix);
- }
-
- /**
- * <p><strong>RuleSet</strong> for processing the contents of a
- * Cluster definition element. </p>
- *
- * @author Filip Hanik
- * @author Peter Rossbach
- * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
- */
-
- public static class DefaultClusterRuleSet extends RuleSetBase {
-
-
- // ----------------------------------------------------- Instance Variables
-
-
- /**
- * The matching pattern prefix to use for recognizing our elements.
- */
- protected String prefix = null;
-
-
- // ------------------------------------------------------------ Constructor
-
-
- /**
- * Construct an instance of this <code>RuleSet</code> with the default
- * matching pattern prefix.
- */
- public DefaultClusterRuleSet() {
-
- this("");
-
- }
-
-
- /**
- * Construct an instance of this <code>RuleSet</code> with the specified
- * matching pattern prefix.
- *
- * @param prefix Prefix for matching pattern rules (including the
- * trailing slash character)
- */
- public DefaultClusterRuleSet(String prefix) {
- super();
- this.namespaceURI = null;
- this.prefix = prefix;
- }
-
-
- // --------------------------------------------------------- Public Methods
-
-
- /**
- * <p>Add the set of Rule instances defined in this RuleSet to the
- * specified <code>Digester</code> instance, associating them with
- * our namespace URI (if any). This method should only be called
- * by a Digester instance.</p>
- *
- * @param digester Digester instance to which the new Rule instances
- * should be added.
- */
- public void addRuleInstances(Digester digester) {
- //Cluster configuration start
- digester.addObjectCreate(prefix + "Membership",
- null, // MUST be specified in the element
- "className");
- digester.addSetProperties(prefix + "Membership");
- digester.addSetNext(prefix + "Membership",
- "setMembershipService",
- "org.apache.catalina.cluster.MembershipService");
-
- digester.addObjectCreate(prefix + "Sender",
- null, // MUST be specified in the element
- "className");
- digester.addSetProperties(prefix + "Sender");
- digester.addSetNext(prefix + "Sender",
- "setClusterSender",
- "org.apache.catalina.cluster.ClusterSender");
-
- digester.addObjectCreate(prefix + "Receiver",
- null, // MUST be specified in the element
- "className");
- digester.addSetProperties(prefix + "Receiver");
- digester.addSetNext(prefix + "Receiver",
- "setClusterReceiver",
- "org.apache.catalina.cluster.ClusterReceiver");
-
- digester.addObjectCreate(prefix + "Valve",
- null, // MUST be specified in the element
- "className");
- digester.addSetProperties(prefix + "Valve");
- digester.addSetNext(prefix + "Valve",
- "addValve",
- "org.apache.catalina.Valve");
-
- digester.addObjectCreate(prefix + "Deployer",
- null, // MUST be specified in the element
- "className");
- digester.addSetProperties(prefix + "Deployer");
- digester.addSetNext(prefix + "Deployer",
- "setClusterDeployer",
- "org.apache.catalina.cluster.ClusterDeployer");
-
- digester.addObjectCreate(prefix + "Listener",
- null, // MUST be specified in the element
- "className");
- digester.addSetProperties(prefix + "Listener");
- digester.addSetNext(prefix + "Listener",
- "addLifecycleListener",
- "org.apache.catalina.LifecycleListener");
-
- digester.addObjectCreate(prefix + "ClusterListener",
- null, // MUST be specified in the element
- "className");
- digester.addSetProperties(prefix + "ClusterListener");
- digester.addSetNext(prefix + "ClusterListener",
- "addClusterListener",
- "org.apache.catalina.cluster.MessageListener");
- //Cluster configuration end
- }
-
-
- }
-}
Modified: trunk/java/org/apache/catalina/startup/Embedded.java
===================================================================
--- trunk/java/org/apache/catalina/startup/Embedded.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/catalina/startup/Embedded.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -427,7 +427,7 @@
connector = new Connector();
connector.setScheme("https");
connector.setSecure(true);
- connector.setProperty("SSLEnabled","true");
+ connector.setPropertyInternal("SSLEnabled","true");
// FIXME !!!! SET SSL PROPERTIES
} else {
connector = new Connector(protocol);
Modified: trunk/java/org/apache/catalina/startup/SetAllPropertiesRule.java
===================================================================
--- trunk/java/org/apache/catalina/startup/SetAllPropertiesRule.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/catalina/startup/SetAllPropertiesRule.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -62,8 +62,15 @@
name = attributes.getQName(i);
}
String value = attributes.getValue(i);
- if ( !excludes.containsKey(name))
- IntrospectionUtils.setProperty(digester.peek(), name, value);
+ if ( !excludes.containsKey(name)) {
+ if (!digester.isFakeAttribute(digester.peek(), name)
+ && !IntrospectionUtils.setProperty(digester.peek(), name, value)
+ && digester.getRulesValidation()) {
+ digester.getLogger().warn("[SetAllPropertiesRule]{" + digester.getMatch() +
+ "} Setting property '" + name + "' to '" +
+ value + "' did not find a matching property.");
+ }
+ }
}
}
Modified: trunk/java/org/apache/catalina/startup/SetContextPropertiesRule.java
===================================================================
--- trunk/java/org/apache/catalina/startup/SetContextPropertiesRule.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/catalina/startup/SetContextPropertiesRule.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -60,7 +60,13 @@
continue;
}
String value = attributes.getValue(i);
- IntrospectionUtils.setProperty(digester.peek(), name, value);
+ if (!digester.isFakeAttribute(digester.peek(), name)
+ && !IntrospectionUtils.setProperty(digester.peek(), name, value)
+ && digester.getRulesValidation()) {
+ digester.getLogger().warn("[SetContextPropertiesRule]{" + digester.getMatch() +
+ "} Setting property '" + name + "' to '" +
+ value + "' did not find a matching property.");
+ }
}
}
Modified: trunk/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -137,22 +137,6 @@
/**
- * Set a property.
- */
- public void setProperty(String name, String value) {
- setAttribute(name, value);
- }
-
-
- /**
- * Get a property
- */
- public String getProperty(String name) {
- return (String) getAttribute(name);
- }
-
-
- /**
* The adapter, used to call the connector
*/
public void setAdapter(Adapter adapter) {
Modified: trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -90,20 +90,6 @@
}
/**
- * Set a property.
- */
- public void setProperty(String name, String value) {
- setAttribute(name, value);
- }
-
- /**
- * Get a property
- */
- public String getProperty(String name) {
- return (String)getAttribute(name);
- }
-
- /**
* The adapter, used to call the connector.
*/
protected Adapter adapter;
@@ -325,15 +311,11 @@
public void setRestrictedUserAgents(String valueS) { restrictedUserAgents = valueS; }
- public String getProtocol() {
- return getProperty("protocol");
- }
+ // HTTP
+ protected String protocol = null;
+ public String getProtocol() { return protocol; }
+ public void setProtocol(String protocol) { setSecure(true); this.protocol = protocol; }
- public void setProtocol( String k ) {
- setSecure(true);
- setAttribute("protocol", k);
- }
-
/**
* Maximum number of requests which can be performed over a keepalive
* connection. The default is the same as for Apache HTTP Server.
Modified: trunk/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Protocol.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/coyote/http11/Http11Protocol.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -103,20 +103,6 @@
/**
- * Set a property.
- */
- public void setProperty(String name, String value) {
- setAttribute(name, value);
- }
-
- /**
- * Get a property
- */
- public String getProperty(String name) {
- return (String)getAttribute(name);
- }
-
- /**
* Pass config info
*/
public void setAttribute(String name, Object value) {
Modified: trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
===================================================================
--- trunk/java/org/apache/tomcat/util/IntrospectionUtils.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/tomcat/util/IntrospectionUtils.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -258,7 +258,7 @@
* int or boolean we'll convert value to the right type before) - that means
* you can have setDebug(1).
*/
- public static void setProperty(Object o, String name, String value) {
+ public static boolean setProperty(Object o, String name, String value) {
if (dbg > 1)
d("setProperty(" + o.getClass() + " " + name + "=" + value + ")");
@@ -275,7 +275,7 @@
&& "java.lang.String".equals(paramT[0].getName())) {
methods[i].invoke(o, new Object[] { value });
- return;
+ return true;
}
}
@@ -328,7 +328,7 @@
if (ok) {
methods[i].invoke(o, params);
- return;
+ return true;
}
}
@@ -344,6 +344,7 @@
params[0] = name;
params[1] = value;
setPropertyMethod.invoke(o, params);
+ return true;
}
} catch (IllegalArgumentException ex2) {
@@ -367,6 +368,7 @@
if (dbg > 1)
ie.printStackTrace();
}
+ return false;
}
public static Object getProperty(Object o, String name) {
Modified: trunk/java/org/apache/tomcat/util/digester/Digester.java
===================================================================
--- trunk/java/org/apache/tomcat/util/digester/Digester.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/tomcat/util/digester/Digester.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -313,6 +313,18 @@
/**
+ * Warn on missing attributes and elements.
+ */
+ protected boolean rulesValidation = false;
+
+
+ /**
+ * Fake attributes map (attributes are often used for object creation).
+ */
+ protected Map<Class, List<String>> fakeAttributes = null;
+
+
+ /**
* The Log to which most logging calls will be made.
*/
protected Log log =
@@ -889,6 +901,72 @@
/**
+ * Return the rules validation flag.
+ */
+ public boolean getRulesValidation() {
+
+ return (this.rulesValidation);
+
+ }
+
+
+ /**
+ * Set the rules validation flag. This must be called before
+ * <code>parse()</code> is called the first time.
+ *
+ * @param rulesValidation The new rules validation flag.
+ */
+ public void setRulesValidation(boolean rulesValidation) {
+
+ this.rulesValidation = rulesValidation;
+
+ }
+
+
+ /**
+ * Return the fake attributes list.
+ */
+ public Map<Class, List<String>> getFakeAttributes() {
+
+ return (this.fakeAttributes);
+
+ }
+
+
+ /**
+ * Determine if an attribute is a fake attribute.
+ */
+ public boolean isFakeAttribute(Object object, String name) {
+
+ if (fakeAttributes == null) {
+ return false;
+ }
+ List<String> result = fakeAttributes.get(object.getClass());
+ if (result == null) {
+ result = fakeAttributes.get(Object.class);
+ }
+ if (result == null) {
+ return false;
+ } else {
+ return result.contains(name);
+ }
+
+ }
+
+
+ /**
+ * Set the fake attributes.
+ *
+ * @param fakeAttributes The new fake attributes.
+ */
+ public void setFakeAttributes(Map<Class, List<String>> fakeAttributes) {
+
+ this.fakeAttributes = fakeAttributes;
+
+ }
+
+
+ /**
* Return the XMLReader to be used for parsing the input document.
*
* FIX ME: there is a bug in JAXP/XERCES that prevent the use of a
@@ -1286,6 +1364,9 @@
if (debug) {
log.debug(" No rules found matching '" + match + "'.");
}
+ if (rulesValidation) {
+ log.warn(" No rules found matching '" + match + "'.");
+ }
}
}
Modified: trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java
===================================================================
--- trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -205,7 +205,13 @@
"} Setting property '" + name + "' to '" +
value + "'");
}
- IntrospectionUtils.setProperty(top, name, value);
+ if (!digester.isFakeAttribute(top, name)
+ && !IntrospectionUtils.setProperty(top, name, value)
+ && digester.getRulesValidation()) {
+ digester.log.warn("[SetPropertiesRule]{" + digester.match +
+ "} Setting property '" + name + "' to '" +
+ value + "' did not find a matching property.");
+ }
}
}
Modified: trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java
===================================================================
--- trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java 2007-08-09 16:47:04 UTC (rev 218)
+++ trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java 2007-08-09 16:48:46 UTC (rev 219)
@@ -125,8 +125,13 @@
}
// Set the property (with conversion as necessary)
- // FIXME: Exception if property doesn't exist ?
- IntrospectionUtils.setProperty(top, actualName, actualValue);
+ if (!digester.isFakeAttribute(top, actualName)
+ && !IntrospectionUtils.setProperty(top, actualName, actualValue)
+ && digester.getRulesValidation()) {
+ digester.log.warn("[SetPropertyRule]{" + digester.match +
+ "} Setting property '" + name + "' to '" +
+ value + "' did not find a matching property.");
+ }
}
17 years, 7 months
JBossWeb SVN: r218 - trunk/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-09 12:47:04 -0400 (Thu, 09 Aug 2007)
New Revision: 218
Modified:
trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
Log:
- Fix leftover handling. Most likely flushBuffer is still incorrect.
Modified: trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
===================================================================
--- trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2007-08-09 16:46:11 UTC (rev 217)
+++ trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2007-08-09 16:47:04 UTC (rev 218)
@@ -547,6 +547,12 @@
}
+ // FIXME: If non blocking (comet) and there are leftover bytes,
+ // and lastWrite was 0 -> error
+ if (leftover.getLength() > 0 && !(Http11AprProcessor.containerThread.get() == Boolean.TRUE)) {
+ throw new IOException("Backlog");
+ }
+
if (lastActiveFilter == -1)
return outputStreamOutputBuffer.doWrite(chunk, res);
else
@@ -760,6 +766,7 @@
// - If the call is asynchronous, throw an exception
// - If the call is synchronous, make a regular blocking write to flush the data
if (leftover.getLength() > 0) {
+ // FIXME: the fact that it's a container thread was already tested in doWrite
if (Http11AprProcessor.containerThread.get() == Boolean.TRUE) {
Socket.optSet(socket, Socket.APR_SO_NONBLOCK, 0);
// Send leftover bytes
@@ -792,6 +799,8 @@
} else {
res = Socket.sendbb(socket, 0, bbuf.position());
}
+ // FIXME: Delaying setting setLastWrite could be a good idea (chunking means separate writes,
+ // and could trigger an exception)
response.setLastWrite(res);
bbuf.clear();
if (res < 0) {
@@ -818,6 +827,14 @@
public int doWrite(ByteChunk chunk, Response res)
throws IOException {
+ // If non blocking (comet) and there are leftover bytes,
+ // put all remaining bytes in the leftover buffer (they are
+ // part of the same write operation)
+ if (leftover.getLength() > 0) {
+ leftover.append(chunk);
+ return chunk.getLength();
+ }
+
int len = chunk.getLength();
int start = chunk.getStart();
byte[] b = chunk.getBuffer();
@@ -825,9 +842,17 @@
int thisTime = len;
if (bbuf.position() == bbuf.capacity()) {
flushBuffer();
- // FIXME: If non blocking (comet) and there are leftover bytes,
- // put all remaining bytes in the leftover buffer
-
+ if (leftover.getLength() > 0) {
+ // If non blocking (comet) and there are leftover bytes,
+ // put all remaining bytes in the leftover buffer (they are
+ // part of the same write operation)
+ int oldStart = chunk.getOffset();
+ chunk.setOffset(start);
+ leftover.append(chunk);
+ chunk.setOffset(oldStart);
+ // After that, all content has been "written"
+ return chunk.getLength();
+ }
}
if (thisTime > bbuf.capacity() - bbuf.position()) {
thisTime = bbuf.capacity() - bbuf.position();
17 years, 7 months
JBossWeb SVN: r217 - trunk/java/org/apache/tomcat/util/net.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-09 12:46:11 -0400 (Thu, 09 Aug 2007)
New Revision: 217
Modified:
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Log:
- Add FIXME.
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2007-08-08 17:32:06 UTC (rev 216)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2007-08-09 16:46:11 UTC (rev 217)
@@ -1590,6 +1590,9 @@
SocketInfo info = localAddList.get();
while (info != null) {
if (info.read || info.write) {
+ // FIXME: Check concurrency to see if the socket isn't being processed for an
+ // event (such as a read if a write is added): need to add a "processing event"
+ // concurrent map ...
// Store timeout
timeouts.add(info.socket, System.currentTimeMillis() + info.timeout);
if (comet) {
17 years, 7 months
JBossWeb SVN: r216 - trunk/java/org/apache/jasper/servlet.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-08 13:32:06 -0400 (Wed, 08 Aug 2007)
New Revision: 216
Modified:
trunk/java/org/apache/jasper/servlet/JspServlet.java
trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
Log:
- Better error reporting when an include doesn't exist.
- To be checked by the TCK ...
Modified: trunk/java/org/apache/jasper/servlet/JspServlet.java
===================================================================
--- trunk/java/org/apache/jasper/servlet/JspServlet.java 2007-08-08 17:30:06 UTC (rev 215)
+++ trunk/java/org/apache/jasper/servlet/JspServlet.java 2007-08-08 17:32:06 UTC (rev 216)
@@ -305,8 +305,25 @@
// Check if the requested JSP page exists, to avoid
// creating unnecessary directories and files.
if (null == context.getResource(jspUri)) {
- response.sendError(HttpServletResponse.SC_NOT_FOUND,
- request.getRequestURI());
+ String includeRequestUri = (String)
+ request.getAttribute(
+ "javax.servlet.include.request_uri");
+ if (includeRequestUri != null) {
+ // This file was included. Throw an exception as
+ // a response.sendError() will be ignored
+ throw new ServletException(Localizer.getMessage(
+ "jsp.error.file.not.found",jspUri));
+ } else {
+ try {
+ response.sendError(
+ HttpServletResponse.SC_NOT_FOUND,
+ request.getRequestURI());
+ } catch (IllegalStateException ise) {
+ log.error(Localizer.getMessage(
+ "jsp.error.file.not.found",
+ jspUri));
+ }
+ }
return;
}
boolean isErrorPage = exception != null;
Modified: trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
===================================================================
--- trunk/java/org/apache/jasper/servlet/JspServletWrapper.java 2007-08-08 17:30:06 UTC (rev 215)
+++ trunk/java/org/apache/jasper/servlet/JspServletWrapper.java 2007-08-08 17:32:06 UTC (rev 216)
@@ -328,25 +328,6 @@
return;
}
- } catch (FileNotFoundException ex) {
- ctxt.incrementRemoved();
- String includeRequestUri = (String)
- request.getAttribute("javax.servlet.include.request_uri");
- if (includeRequestUri != null) {
- // This file was included. Throw an exception as
- // a response.sendError() will be ignored by the
- // servlet engine.
- throw new ServletException(ex);
- } else {
- try {
- response.sendError(HttpServletResponse.SC_NOT_FOUND,
- ex.getMessage());
- } catch (IllegalStateException ise) {
- log.error(Localizer.getMessage("jsp.error.file.not.found",
- ex.getMessage()),
- ex);
- }
- }
} catch (ServletException ex) {
if (options.getDevelopment()) {
throw handleJspException(ex);
17 years, 7 months
JBossWeb SVN: r215 - trunk/java/org/apache/catalina/util.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-08 13:30:06 -0400 (Wed, 08 Aug 2007)
New Revision: 215
Modified:
trunk/java/org/apache/catalina/util/RequestUtil.java
Log:
- Support '+' in various patterns in configuration files.
Modified: trunk/java/org/apache/catalina/util/RequestUtil.java
===================================================================
--- trunk/java/org/apache/catalina/util/RequestUtil.java 2007-08-08 17:10:08 UTC (rev 214)
+++ trunk/java/org/apache/catalina/util/RequestUtil.java 2007-08-08 17:30:06 UTC (rev 215)
@@ -187,7 +187,7 @@
* Decode and return the specified URL-encoded String.
* When the byte array is converted to a string, the system default
* character encoding is used... This may be different than some other
- * servers.
+ * servers. It is assumed the string is not a query string.
*
* @param str The url-encoded string
*
@@ -202,7 +202,8 @@
/**
- * Decode and return the specified URL-encoded String.
+ * Decode and return the specified URL-encoded String. It is assumed the
+ * string is not a query string.
*
* @param str The url-encoded string
* @param enc The encoding to use; if null, the default encoding is used
@@ -210,7 +211,19 @@
* by a valid 2-digit hexadecimal number
*/
public static String URLDecode(String str, String enc) {
+ return URLDecode(str, enc, false);
+ }
+ /**
+ * Decode and return the specified URL-encoded String.
+ *
+ * @param str The url-encoded string
+ * @param enc The encoding to use; if null, the default encoding is used
+ * @param isQuery Is this a query string being processed
+ * @exception IllegalArgumentException if a '%' character is not followed
+ * by a valid 2-digit hexadecimal number
+ */
+ public static String URLDecode(String str, String enc, boolean isQuery) {
if (str == null)
return (null);
@@ -226,7 +239,7 @@
}
} catch (UnsupportedEncodingException uee) {}
- return URLDecode(bytes, enc);
+ return URLDecode(bytes, enc, isQuery);
}
@@ -252,7 +265,20 @@
* by a valid 2-digit hexadecimal number
*/
public static String URLDecode(byte[] bytes, String enc) {
+ return URLDecode(bytes, null, false);
+ }
+ /**
+ * Decode and return the specified URL-encoded byte array.
+ *
+ * @param bytes The url-encoded byte array
+ * @param enc The encoding to use; if null, the default encoding is used
+ * @param isQuery Is this a query string being processed
+ * @exception IllegalArgumentException if a '%' character is not followed
+ * by a valid 2-digit hexadecimal number
+ */
+ public static String URLDecode(byte[] bytes, String enc, boolean isQuery) {
+
if (bytes == null)
return (null);
@@ -261,7 +287,7 @@
int ox = 0;
while (ix < len) {
byte b = bytes[ix++]; // Get byte to test
- if (b == '+') {
+ if (b == '+' && isQuery) {
b = (byte)' ';
} else if (b == '%') {
b = (byte) ((convertHexDigit(bytes[ix++]) << 4)
17 years, 7 months
JBossWeb SVN: r214 - branches/2.0.x/src/share/classes/org/apache/tomcat/util/net.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-08-08 13:10:08 -0400 (Wed, 08 Aug 2007)
New Revision: 214
Modified:
branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java
Log:
- Start accept thread last.
Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java 2007-08-04 17:00:23 UTC (rev 213)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java 2007-08-08 17:10:08 UTC (rev 214)
@@ -725,14 +725,6 @@
workers = new WorkerStack(maxThreads);
}
- // Start acceptor threads
- for (int i = 0; i < acceptorThreadCount; i++) {
- Thread acceptorThread = new Thread(new Acceptor(), getName() + "-Acceptor-" + i);
- acceptorThread.setPriority(threadPriority);
- acceptorThread.setDaemon(daemon);
- acceptorThread.start();
- }
-
// Start poller threads
pollers = new Poller[pollerThreadCount];
for (int i = 0; i < pollerThreadCount; i++) {
@@ -767,6 +759,15 @@
sendfileThread.start();
}
}
+
+ // Start acceptor threads
+ for (int i = 0; i < acceptorThreadCount; i++) {
+ Thread acceptorThread = new Thread(new Acceptor(), getName() + "-Acceptor-" + i);
+ acceptorThread.setPriority(threadPriority);
+ acceptorThread.setDaemon(daemon);
+ acceptorThread.start();
+ }
+
}
}
17 years, 7 months