[jboss-cvs] JBossAS SVN: r94044 - in projects/interceptors/trunk/src: main/java/org/jboss/interceptor/proxy and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Sep 26 23:14:55 EDT 2009
Author: marius.bogoevici
Date: 2009-09-26 23:14:54 -0400 (Sat, 26 Sep 2009)
New Revision: 94044
Added:
projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/ClassInterceptorMetadata.java
projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/InterceptorMetadata.java
projects/interceptors/trunk/src/test/resources/
projects/interceptors/trunk/src/test/resources/log4j.properties
Modified:
projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/InterceptionModelImpl.java
projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptionChain.java
projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptionHandler.java
projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptorProxyCreatorImpl.java
projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/SimpleInterceptionHandler.java
projects/interceptors/trunk/src/main/java/org/jboss/interceptor/util/InterceptionUtils.java
projects/interceptors/trunk/src/test/java/org/jboss/interceptors/InterceptionTest.java
Log:
When registering an interceptor, methods from superclasses will be also invoked.
Added: projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/ClassInterceptorMetadata.java
===================================================================
--- projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/ClassInterceptorMetadata.java (rev 0)
+++ projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/ClassInterceptorMetadata.java 2009-09-27 03:14:54 UTC (rev 94044)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.jboss.interceptor.model;
+
+import org.jboss.interceptor.proxy.InterceptorException;
+
+import javax.interceptor.InvocationContext;
+import java.lang.reflect.Method;
+import java.util.*;
+
+/**
+ * @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
+ */
+public class ClassInterceptorMetadata implements InterceptorMetadata
+{
+
+ private Class<?> interceptorClass;
+
+ private Map<InterceptionType, List<Method>> methodMap = new HashMap<InterceptionType, List<Method>>();
+
+ public ClassInterceptorMetadata(Class<?> interceptorClass)
+ {
+ this.interceptorClass = interceptorClass;
+
+ Class<?> currentClass = interceptorClass;
+
+
+ Set<String> foundMethodNames = new HashSet<String>();
+ do
+ {
+ Set<InterceptionType> detectedInterceptorTypes = new HashSet<InterceptionType>();
+ for (InterceptionType interceptionType : InterceptionTypeRegistry.getSupportedInterceptionTypes())
+ {
+ for (Method method : currentClass.getDeclaredMethods())
+ {
+ if (method.getParameterTypes().length == 1 && method.getParameterTypes()[0].equals(InvocationContext.class) && method.getAnnotation(InterceptionTypeRegistry.getAnnotationClass(interceptionType)) != null)
+ {
+ if (methodMap.get(interceptionType) == null)
+ methodMap.put(interceptionType, new LinkedList<Method>());
+ if (detectedInterceptorTypes.contains(interceptionType))
+ throw new InterceptorException("Same interception type cannot be specified twice on the same class");
+ else
+ detectedInterceptorTypes.add(interceptionType);
+ // add method in the list - if it is there already, it means that it has been added by a subclass
+ ensureAccessible(method);
+ if (!foundMethodNames.contains(method.getName()))
+ {
+ methodMap.get(interceptionType).add(method);
+ foundMethodNames.add(method.getName());
+ }
+ }
+ }
+ }
+ currentClass = currentClass.getSuperclass();
+ } while (currentClass != null);
+ }
+
+ public static void ensureAccessible(Method method)
+ {
+ if (!method.isAccessible())
+ {
+ method.setAccessible(true);
+ }
+ }
+
+ public Class<?> getInterceptorClass()
+ {
+ return interceptorClass;
+ }
+
+ public List<Method> getInterceptorMethods(InterceptionType interceptionType)
+ {
+ return methodMap.get(interceptionType);
+ }
+
+}
Modified: projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/InterceptionModelImpl.java
===================================================================
--- projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/InterceptionModelImpl.java 2009-09-26 03:04:26 UTC (rev 94043)
+++ projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/InterceptionModelImpl.java 2009-09-27 03:14:54 UTC (rev 94044)
@@ -104,7 +104,10 @@
{
for (Class<?> clazz: interceptors)
if (interceptorsList.contains(clazz))
- throw new InterceptorException("Duplicate interceptor class definition when binding" + clazz.getName() + " on " + interceptionType.name());
+ if (interceptionType != null)
+ throw new InterceptorException("Duplicate interceptor class definition when binding" + clazz.getName() + " on " + interceptionType.name());
+ else
+ throw new InterceptorException("Duplicate interceptor class definition when binding" + clazz.getName() + " as general interceptor");
else
interceptorsList.add(clazz);
}
Added: projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/InterceptorMetadata.java
===================================================================
--- projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/InterceptorMetadata.java (rev 0)
+++ projects/interceptors/trunk/src/main/java/org/jboss/interceptor/model/InterceptorMetadata.java 2009-09-27 03:14:54 UTC (rev 94044)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed 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.jboss.interceptor.model;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
+ */
+public interface InterceptorMetadata
+{
+ Class<?> getInterceptorClass();
+
+ List<Method> getInterceptorMethods(InterceptionType interceptionType);
+
+}
Modified: projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptionChain.java
===================================================================
--- projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptionChain.java 2009-09-26 03:04:26 UTC (rev 94043)
+++ projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptionChain.java 2009-09-27 03:14:54 UTC (rev 94044)
@@ -18,6 +18,8 @@
package org.jboss.interceptor.proxy;
import org.jboss.interceptor.model.InterceptionType;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.interceptor.InvocationContext;
import java.lang.reflect.Method;
@@ -31,6 +33,8 @@
public class InterceptionChain
{
+ private final Log log = LogFactory.getLog(InterceptionChain.class);
+
private Object target;
private Object[] parameters;
@@ -54,11 +58,13 @@
this.currentPosition = 0;
}
- public Object invokeNext(InvocationContext invocationContext) {
+ public Object invokeNext(InvocationContext invocationContext) throws Exception {
if (hasNext())
{
- return interceptionHandlerMap.get(interceptorClasses.get(currentPosition++)).invoke(target, interceptionType, invocationContext);
+ InterceptionHandler nextInterceptorHandler = interceptionHandlerMap.get(interceptorClasses.get(currentPosition++));
+ log.debug("Invoking next interceptor in chain:" + nextInterceptorHandler.getClass().getName());
+ return nextInterceptorHandler.invoke(target, interceptionType, invocationContext);
}
else
{
Modified: projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptionHandler.java
===================================================================
--- projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptionHandler.java 2009-09-26 03:04:26 UTC (rev 94043)
+++ projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptionHandler.java 2009-09-27 03:14:54 UTC (rev 94044)
@@ -26,7 +26,7 @@
*/
public interface InterceptionHandler
{
- public Object invoke(Object target, InterceptionType interceptionType, InvocationContext invocationContext);
+ public Object invoke(Object target, InterceptionType interceptionType, InvocationContext invocationContext) throws Exception;
boolean handles(Class<?> clazz);
}
Modified: projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptorProxyCreatorImpl.java
===================================================================
--- projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptorProxyCreatorImpl.java 2009-09-26 03:04:26 UTC (rev 94043)
+++ projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/InterceptorProxyCreatorImpl.java 2009-09-27 03:14:54 UTC (rev 94044)
@@ -19,6 +19,8 @@
import org.jboss.interceptor.registry.InterceptorRegistry;
import org.jboss.interceptor.model.InterceptionType;
+import org.jboss.interceptor.model.InterceptorMetadata;
+import org.jboss.interceptor.model.ClassInterceptorMetadata;
import static org.jboss.interceptor.util.InterceptionUtils.isAroundInvokeInterceptionCandidate;
import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.MethodHandler;
@@ -115,6 +117,7 @@
private InterceptorRegistry registry;
private Map<Class<?>, InterceptionHandler> interceptorHandlerInstances = new HashMap<Class<?>, InterceptionHandler>();
private Class<?> targetClazz;
+ private InterceptorMetadata targetClassInterceptorMetadata;
public InstanceProxifyingMethodHandler(Object target, Class<?> targetClass, InterceptorRegistry<Class<?>> registry)
{
@@ -134,7 +137,7 @@
{
interceptorHandlerInstances.put(interceptorClazz, interceptionHandlerFactory.createForClass(interceptorClazz));
}
-
+ targetClassInterceptorMetadata = new ClassInterceptorMetadata(targetClazz);
interceptorHandlerInstances.put(targetClazz, new SimpleInterceptionHandler(target, targetClazz));
}
@@ -160,14 +163,16 @@
}
-
- private Object executeInterception(Method thisMethod, Object[] args, InterceptionType interceptionType)
+ private Object executeInterception(Method thisMethod, Object[] args, InterceptionType interceptionType) throws Exception
{
List<Class<?>> interceptorClasses = registry.getInterceptionModel(targetClazz).getInterceptors(interceptionType, thisMethod);
List<Class<?>> interceptorClassesForMethod = interceptorClasses == null ? new ArrayList<Class<?>>() : interceptorClasses;
//assume the list is immutable
- interceptorClassesForMethod = new ArrayList(interceptorClassesForMethod);
- interceptorClassesForMethod.add(targetClazz);
+ if (targetClassInterceptorMetadata.getInterceptorMethods(interceptionType) != null && !targetClassInterceptorMetadata.getInterceptorMethods(interceptionType).isEmpty())
+ {
+ interceptorClassesForMethod = new ArrayList(interceptorClassesForMethod);
+ interceptorClassesForMethod.add(targetClazz);
+ }
InterceptionChain chain = new InterceptionChain(interceptorClassesForMethod, interceptionType, target, thisMethod, args, interceptorHandlerInstances);
return chain.invokeNext(new InterceptorInvocationContext(chain, target, thisMethod, args));
}
@@ -179,7 +184,9 @@
private InterceptorRegistry registry;
private Map<Class<?>, InterceptionHandler> interceptorHandlerInstances = new HashMap<Class<?>, InterceptionHandler>();
private Class<?> targetClazz;
+ private InterceptorMetadata targetClassInterceptorMetadata;
+
public AutoProxifiedMethodHandler(Class<?> targetClazz, InterceptorRegistry<Class<?>> registry)
{
if (targetClazz == null)
@@ -192,6 +199,7 @@
{
interceptorHandlerInstances.put(interceptorClazz, new SimpleInterceptionHandler(interceptorClazz));
}
+ targetClassInterceptorMetadata = new ClassInterceptorMetadata(targetClazz);
}
public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable
@@ -216,14 +224,16 @@
return null;
}
- private Object executeInterception(Object self, Method thisMethod, Method proceed, Object[] args, InterceptionType interceptionType)
+ private Object executeInterception(Object self, Method thisMethod, Method proceed, Object[] args, InterceptionType interceptionType) throws Exception
{
addSelfAsInterceptorHandler(self);
List<Class<?>> interceptorClasses = registry.getInterceptionModel(targetClazz).getInterceptors(interceptionType, thisMethod);
List<Class<?>> interceptorClassesForMethod = interceptorClasses == null ? new ArrayList<Class<?>>() : interceptorClasses;
- //assume the list is immutable and always consider target class as interception targets
- interceptorClassesForMethod = new ArrayList(interceptorClassesForMethod);
- interceptorClassesForMethod.add(targetClazz);
+ if (targetClassInterceptorMetadata.getInterceptorMethods(interceptionType) != null && !targetClassInterceptorMetadata.getInterceptorMethods(interceptionType).isEmpty())
+ {
+ interceptorClassesForMethod = new ArrayList(interceptorClassesForMethod);
+ interceptorClassesForMethod.add(targetClazz);
+ }
InterceptionChain chain = new InterceptionChain(interceptorClassesForMethod, interceptionType, self, proceed, args, interceptorHandlerInstances);
return chain.invokeNext(new InterceptorInvocationContext(chain, self, proceed, args));
}
Modified: projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/SimpleInterceptionHandler.java
===================================================================
--- projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/SimpleInterceptionHandler.java 2009-09-26 03:04:26 UTC (rev 94043)
+++ projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/SimpleInterceptionHandler.java 2009-09-27 03:14:54 UTC (rev 94044)
@@ -18,13 +18,14 @@
package org.jboss.interceptor.proxy;
import org.jboss.interceptor.model.InterceptionType;
-import org.jboss.interceptor.model.InterceptionTypeRegistry;
+import org.jboss.interceptor.model.InterceptorMetadata;
+import org.jboss.interceptor.model.ClassInterceptorMetadata;
import javax.interceptor.InvocationContext;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
-import java.util.Map;
-import java.util.HashMap;
+import java.util.*;
+import java.util.concurrent.ConcurrentLinkedQueue;
/**
* @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
@@ -34,7 +35,7 @@
private final Object interceptorInstance;
- private final Map<InterceptionType, Method> interceptorMethods = new HashMap<InterceptionType, Method>();
+ private InterceptorMetadata interceptorMetadata;
private Class<?> clazz;
@@ -43,18 +44,9 @@
if (interceptorInstance == null)
throw new IllegalArgumentException("Interceptor instance cannot be null");
- this.clazz = (clazz == null) ?interceptorInstance.getClass():clazz;
+ this.clazz = (clazz == null) ? interceptorInstance.getClass() : clazz;
this.interceptorInstance = interceptorInstance;
- for (InterceptionType interceptionType : InterceptionTypeRegistry.getSupportedInterceptionTypes())
- {
- for (Method method : clazz.getDeclaredMethods())
- {
- if (method.getParameterTypes().length == 1 && method.getParameterTypes()[0].equals(InvocationContext.class) && method.getAnnotation(InterceptionTypeRegistry.getAnnotationClass(interceptionType)) != null)
- {
- interceptorMethods.put(interceptionType, method);
- }
- }
- }
+ this.interceptorMetadata = new ClassInterceptorMetadata(this.clazz);
}
@@ -72,34 +64,19 @@
{
throw new InterceptorException("Cannot create interceptor instance:", e);
}
- for (InterceptionType interceptionType : InterceptionTypeRegistry.getSupportedInterceptionTypes())
- {
- for (Method method : simpleInterceptorClass.getDeclaredMethods())
- {
- if (method.getParameterTypes().length == 1 && method.getParameterTypes()[0].equals(InvocationContext.class) && method.getAnnotation(InterceptionTypeRegistry.getAnnotationClass(interceptionType)) != null)
- {
- interceptorMethods.put(interceptionType, method);
- }
- }
- }
+ this.interceptorMetadata = new ClassInterceptorMetadata(this.clazz);
}
- public Object invoke(Object target, InterceptionType interceptionType, InvocationContext invocationContext)
+ public Object invoke(Object target, InterceptionType interceptionType, InvocationContext invocationContext) throws Exception
{
- try
+ List<Method> methods = interceptorMetadata.getInterceptorMethods(interceptionType);
+ if (methods != null)
{
- if (interceptorMethods.get(interceptionType) != null)
- return interceptorMethods.get(interceptionType).invoke(interceptorInstance, new Object[]{invocationContext});
- else
- return null;
- } catch (IllegalAccessException e)
- {
- throw new RuntimeException((e));
- } catch (InvocationTargetException e)
- {
- throw new RuntimeException(e);
- }
+ DelegatingInvocationContext delegatingInvocationContext = new DelegatingInvocationContext(invocationContext, interceptorInstance, methods);
+ return delegatingInvocationContext.proceed();
+ } else
+ throw new InterceptorException(target.toString() + " was requested to perform " + interceptionType.name() + " but no such method is defined on it");
}
@@ -107,4 +84,59 @@
{
return this.clazz.equals(clazz);
}
+
+ public class DelegatingInvocationContext implements InvocationContext
+ {
+
+ private InvocationContext delegateInvocationContext;
+
+ private Object targetObject;
+
+ private Queue<Method> invocationQueue;
+
+ public DelegatingInvocationContext(InvocationContext delegateInvocationContext, Object targetObject, List<Method> methods)
+ {
+ this.delegateInvocationContext = delegateInvocationContext;
+ this.targetObject = targetObject;
+ this.invocationQueue = new ConcurrentLinkedQueue<Method>(methods);
+ }
+
+ public Map<String, Object> getContextData()
+ {
+ return delegateInvocationContext.getContextData();
+ }
+
+ public Method getMethod()
+ {
+ return delegateInvocationContext.getMethod();
+ }
+
+ public Object[] getParameters()
+ {
+ return delegateInvocationContext.getParameters();
+ }
+
+ public Object getTarget()
+ {
+ return delegateInvocationContext.getTarget();
+ }
+
+ public Object proceed() throws Exception
+ {
+ if (!invocationQueue.isEmpty())
+ {
+ return invocationQueue.remove().invoke(targetObject, this);
+ } else
+ {
+ return delegateInvocationContext.proceed();
+ }
+ }
+
+ public void setParameters(Object[] params)
+ {
+ delegateInvocationContext.setParameters(params);
+ }
+ }
+
}
+
Modified: projects/interceptors/trunk/src/main/java/org/jboss/interceptor/util/InterceptionUtils.java
===================================================================
--- projects/interceptors/trunk/src/main/java/org/jboss/interceptor/util/InterceptionUtils.java 2009-09-26 03:04:26 UTC (rev 94043)
+++ projects/interceptors/trunk/src/main/java/org/jboss/interceptor/util/InterceptionUtils.java 2009-09-27 03:14:54 UTC (rev 94044)
@@ -18,9 +18,12 @@
package org.jboss.interceptor.util;
import org.jboss.interceptor.proxy.InterceptorProxyCreatorImpl;
+import org.jboss.interceptor.model.InterceptionType;
+import org.jboss.interceptor.model.InterceptionTypeRegistry;
import javax.interceptor.AroundInvoke;
import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
/**
* @author <a href="mailto:mariusb at redhat.com">Marius Bogoevici</a>
@@ -45,9 +48,21 @@
}
}
- public static boolean isAroundInvokeInterceptionCandidate(Method thisMethod)
+ /**
+ * @param method
+ * @return true if the method has none of the interception type annotations, and is public and not static
+ * false otherwise
+ */
+ public static boolean isAroundInvokeInterceptionCandidate(Method method)
{
// just a provisory implementation
- return thisMethod.getAnnotation(AroundInvoke.class) == null;
+ int modifiers = method.getModifiers();
+ for (InterceptionType interceptionType: InterceptionTypeRegistry.getSupportedInterceptionTypes())
+ {
+ if (method.getAnnotation(InterceptionTypeRegistry.getAnnotationClass(interceptionType)) != null)
+ return true;
+ }
+ return Modifier.isPublic(modifiers)
+ && !Modifier.isStatic(modifiers);
}
}
Modified: projects/interceptors/trunk/src/test/java/org/jboss/interceptors/InterceptionTest.java
===================================================================
--- projects/interceptors/trunk/src/test/java/org/jboss/interceptors/InterceptionTest.java 2009-09-26 03:04:26 UTC (rev 94043)
+++ projects/interceptors/trunk/src/test/java/org/jboss/interceptors/InterceptionTest.java 2009-09-27 03:14:54 UTC (rev 94044)
@@ -113,7 +113,7 @@
{
@AroundInvoke
- public Object doAround2(InvocationContext invocationContext) throws Exception
+ private final Object doAround(InvocationContext invocationContext) throws Exception
{
InterceptorTestLogger.add(MyFirstInterceptor.class, "aroundInvokeBefore");
Object result = invocationContext.proceed();
@@ -132,7 +132,7 @@
public static class MySecondInterceptor extends MyFirstInterceptor
{
@AroundInvoke
- public Object doAround(InvocationContext invocationContext) throws Exception
+ private Object doAround(InvocationContext invocationContext) throws Exception
{
InterceptorTestLogger.add(MySecondInterceptor.class, "aroundInvokeBefore");
Object result = invocationContext.proceed();
@@ -141,7 +141,7 @@
}
@PreDestroy
- public Object doneHere(InvocationContext invocationContext) throws Exception
+ private Object doneHere(InvocationContext invocationContext) throws Exception
{
InterceptorTestLogger.add(MySecondInterceptor.class, "preDestroy");
return invocationContext.proceed();
Added: projects/interceptors/trunk/src/test/resources/log4j.properties
===================================================================
--- projects/interceptors/trunk/src/test/resources/log4j.properties (rev 0)
+++ projects/interceptors/trunk/src/test/resources/log4j.properties 2009-09-27 03:14:54 UTC (rev 94044)
@@ -0,0 +1,9 @@
+# Set root category priority to DEBUG and set its only appender to A1
+log4j.rootCategory=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender (writes to system console).
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list