openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1362228 [2/3] - in /openwebbeans/trunk: atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/ webbeans-ee/src/main/java/org/apache/webbeans/ee/event/ webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/component/ web...
Date Mon, 16 Jul 2012 19:56:26 GMT
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/StereoTypeModel.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/StereoTypeModel.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/StereoTypeModel.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/StereoTypeModel.java Mon Jul 16 19:56:23 2012
@@ -23,6 +23,8 @@ import java.lang.annotation.ElementType;
 import java.lang.annotation.Target;
 import java.util.HashSet;
 import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.enterprise.context.NormalScope;
 import javax.enterprise.inject.Default;
@@ -35,7 +37,7 @@ import org.apache.webbeans.config.OWBLog
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.deployment.stereotype.IStereoTypeModel;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.util.AnnotationUtil;
 
 /**
@@ -61,7 +63,7 @@ public class StereoTypeModel implements 
     /**Inherit StereoType annotations*/
     private Set<Annotation> inherits = new HashSet<Annotation>();
     
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(StereoTypeModel.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(StereoTypeModel.class);
 
     /**
      * Creates a new instance of the stereotype model for
@@ -86,9 +88,9 @@ public class StereoTypeModel implements 
     {
         if(clazz.getAnnotation(Typed.class) != null)
         {
-            if(logger.wblWillLogWarn())
+            if(logger.isLoggable(Level.WARNING))
             {
-                logger.warn(OWBLogConst.WARN_0016, clazz.getName());
+                logger.log(Level.WARNING, OWBLogConst.WARN_0016, clazz.getName());
             }            
         }
 
@@ -106,9 +108,9 @@ public class StereoTypeModel implements 
                 
                 if(qualifier.annotationType() != Named.class)
                 {
-                    if(logger.wblWillLogWarn())
+                    if(logger.isLoggable(Level.WARNING))
                     {
-                        logger.warn(OWBLogConst.WARN_0017, clazz.getName(),qualifier.annotationType().getName());
+                        logger.log(Level.WARNING, OWBLogConst.WARN_0017, WebBeansLoggerFacade.args(clazz.getName(),qualifier.annotationType().getName()));
                     }
                 }
             }            

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java Mon Jul 16 19:56:23 2012
@@ -30,6 +30,7 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Logger;
 
 import javax.enterprise.event.ObserverException;
 import javax.enterprise.event.Observes;
@@ -44,7 +45,7 @@ import org.apache.webbeans.component.Inj
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.exception.WebBeansException;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.portable.events.generics.GenericBeanEvent;
 import org.apache.webbeans.portable.events.generics.GenericProducerObserverEvent;
 import org.apache.webbeans.spi.TransactionService;
@@ -57,7 +58,7 @@ import org.apache.webbeans.util.WebBeans
 @SuppressWarnings("unchecked")
 public final class NotificationManager
 {
-    private final WebBeansLogger logger = WebBeansLogger.getLogger(NotificationManager.class);
+    private final Logger logger = WebBeansLoggerFacade.getLogger(NotificationManager.class);
 
     private final Map<Type, Set<ObserverMethod<?>>> observers = new ConcurrentHashMap<Type, Set<ObserverMethod<?>>>();
     private final WebBeansContext webBeansContext;
@@ -472,7 +473,7 @@ public final class NotificationManager
                 
                 if (!RuntimeException.class.isAssignableFrom(exc.getClass()))
                 {
-                    throw new ObserverException(logger.getTokenString(OWBLogConst.EXCEPT_0008) + event.getClass().getName(), e);
+                    throw new ObserverException(WebBeansLoggerFacade.getTokenString(OWBLogConst.EXCEPT_0008) + event.getClass().getName(), e);
                 }
                 else
                 {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java Mon Jul 16 19:56:23 2012
@@ -27,6 +27,8 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.enterprise.context.ContextNotActiveException;
 import javax.enterprise.context.Dependent;
@@ -56,7 +58,7 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.inject.impl.InjectionPointFactory;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.portable.AnnotatedElementFactory;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.ClassUtil;
@@ -87,7 +89,7 @@ import org.apache.webbeans.util.WebBeans
 public class ObserverMethodImpl<T> implements ObserverMethod<T>
 {
     /**Logger instance*/
-    private final WebBeansLogger logger = WebBeansLogger.getLogger(ObserverMethodImpl.class);
+    private final Logger logger = WebBeansLoggerFacade.getLogger(ObserverMethodImpl.class);
 
     /**Observer owner bean that defines observer method*/
     private final InjectionTargetBean<?> bean;
@@ -189,7 +191,7 @@ public class ObserverMethodImpl<T> imple
     @SuppressWarnings("unchecked")
     public void notify(T event)
     {
-        logger.trace("Notifying with event payload : [{0}]", event);
+        logger.log(Level.FINEST, "Notifying with event payload : [{0}]", event);
         
         AbstractOwbBean<Object> component = (AbstractOwbBean<Object>) bean;
         if (!bean.isEnabled())
@@ -245,7 +247,7 @@ public class ObserverMethodImpl<T> imple
                 catch (ContextNotActiveException cnae)
                 {
                     // this may happen if we try to e.g. send an event to a @ConversationScoped bean from a ServletListener
-                    logger.info(OWBLogConst.INFO_0010, bean);
+                    logger.log(Level.INFO, OWBLogConst.INFO_0010, bean);
                     return;
                 }
                 
@@ -572,7 +574,7 @@ public class ObserverMethodImpl<T> imple
      * EJBs so that the method used will be from an interface and not the
      * EJB class that likely can not be invoked on the EJB proxy
      * 
-     * @param method to be invoked as the observer
+     * @param m method to be invoked as the observer
      */
     public void setObserverMethod(Method m)
     {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java Mon Jul 16 19:56:23 2012
@@ -20,6 +20,8 @@ package org.apache.webbeans.intercept;
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -35,7 +37,7 @@ import org.apache.webbeans.context.creat
 import org.apache.webbeans.decorator.WebBeansDecoratorInterceptor;
 import org.apache.webbeans.inject.OWBInjector;
 import org.apache.webbeans.intercept.webbeans.WebBeansInterceptor;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.plugins.OpenWebBeansEjbLCAPlugin;
 
 /**
@@ -46,7 +48,7 @@ import org.apache.webbeans.plugins.OpenW
 public class InterceptorDataImpl implements InterceptorData
 {
     // Logger instance
-    private final static WebBeansLogger logger = WebBeansLogger.getLogger(InterceptorDataImpl.class);
+    private final static Logger logger = WebBeansLoggerFacade.getLogger(InterceptorDataImpl.class);
 
     /** Around invokes method */
     private Method aroundInvoke = null;
@@ -456,7 +458,7 @@ public class InterceptorDataImpl impleme
                 }
                 catch (Exception e)
                 {
-                    logger.error(OWBLogConst.ERROR_0022, e, interceptorClass);
+                    logger.log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0022, interceptorClass), e);
                 }
 
                 ownerCreationalContext.addEjbInterceptor(ownerInstance, ctx);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java Mon Jul 16 19:56:23 2012
@@ -28,6 +28,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.interceptor.InvocationContext;
 import javassist.util.proxy.MethodHandler;
@@ -43,7 +45,7 @@ import org.apache.webbeans.context.creat
 import org.apache.webbeans.decorator.DelegateHandler;
 import org.apache.webbeans.decorator.WebBeansDecoratorConfig;
 import org.apache.webbeans.decorator.WebBeansDecoratorInterceptor;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.util.ClassUtil;
 
 /**
@@ -144,7 +146,7 @@ public abstract class InterceptorHandler
     private static final long serialVersionUID = 1L;
     
     /**Logger instance*/
-    private final WebBeansLogger logger = WebBeansLogger.getLogger(InterceptorHandler.class);
+    private final Logger logger = WebBeansLoggerFacade.getLogger(InterceptorHandler.class);
     
     /**Proxied bean*/
     protected OwbBean<?> bean = null;
@@ -384,7 +386,7 @@ public abstract class InterceptorHandler
         else
         {
             s.writeObject(null);
-            logger.warn(OWBLogConst.WARN_0010, bean);
+            logger.log(Level.WARNING, OWBLogConst.WARN_0010, bean);
         }
     }
     
@@ -407,7 +409,7 @@ public abstract class InterceptorHandler
         }
         else
         {
-            logger.warn(OWBLogConst.WARN_0011, bean);
+            logger.log(Level.WARNING, OWBLogConst.WARN_0011, bean);
         }
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java Mon Jul 16 19:56:23 2012
@@ -27,6 +27,8 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -48,7 +50,7 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.context.creational.CreationalContextImpl;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.WebBeansException;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.plugins.OpenWebBeansEjbLCAPlugin;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.Asserts;
@@ -57,7 +59,7 @@ import org.apache.webbeans.util.ClassUti
 
 public final class InterceptorUtil
 {
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(InterceptorUtil.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(InterceptorUtil.class);
 
     private final OpenWebBeansEjbLCAPlugin ejbPlugin;
     private final Class<? extends Annotation> prePassivateClass;
@@ -642,9 +644,9 @@ public final class InterceptorUtil
                 InterceptorData overridenInterceptor = getOverridenInterceptor(beanClass, interceptorData, stack);
                 if (null != overridenInterceptor)
                 {
-                    if (logger.wblWillLogDebug())
+                    if (logger.isLoggable(Level.FINE))
                     {
-                        logger.debug("REMOVING parent " + overridenInterceptor);
+                        logger.fine("REMOVING parent " + overridenInterceptor);
                     }
 
                     it.remove();
@@ -683,9 +685,9 @@ public final class InterceptorUtil
                             overridenInterceptors = new ArrayList<InterceptorData>();
                         }
                         overridenInterceptors.add(overridenInterceptor);
-                        if (logger.wblWillLogDebug())
+                        if (logger.isLoggable(Level.FINE))
                         {
-                            logger.debug("REMOVING parent " + overridenInterceptor);
+                            logger.fine("REMOVING parent " + overridenInterceptor);
                         }
 
                     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java Mon Jul 16 19:56:23 2012
@@ -26,7 +26,7 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.config.inheritance.IBeanInheritedMetaData;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.intercept.webbeans.WebBeansInterceptor;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.plugins.OpenWebBeansEjbLCAPlugin;
 import org.apache.webbeans.spi.BDABeansXmlScanner;
 import org.apache.webbeans.spi.ScannerService;
@@ -49,6 +49,8 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * Configures the Web Beans related interceptors.
@@ -60,7 +62,7 @@ import java.util.Set;
 public final class WebBeansInterceptorConfig
 {
     /** Logger instance */
-    private static WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansInterceptorConfig.class);
+    private static Logger logger = WebBeansLoggerFacade.getLogger(WebBeansInterceptorConfig.class);
 
     private WebBeansContext webBeansContext;
 
@@ -78,31 +80,31 @@ public final class WebBeansInterceptorCo
     {
         if(delegate.getScope() != Dependent.class)
         {
-            if(logger.wblWillLogWarn())
+            if(logger.isLoggable(Level.WARNING))
             {
-                logger.warn(OWBLogConst.WARN_0005_1, delegate.getBeanClass().getName());
+                logger.log(Level.WARNING, OWBLogConst.WARN_0005_1, delegate.getBeanClass().getName());
             }
         }
 
         if(delegate.getName() != null)
         {
-            if(logger.wblWillLogWarn())
+            if(logger.isLoggable(Level.WARNING))
             {
-                logger.warn(OWBLogConst.WARN_0005_2, delegate.getBeanClass().getName());
+                logger.log(Level.WARNING, OWBLogConst.WARN_0005_2, delegate.getBeanClass().getName());
             }
         }
 
         if(delegate.isAlternative())
         {
-            if(logger.wblWillLogWarn())
+            if(logger.isLoggable(Level.WARNING))
             {
-                logger.warn(OWBLogConst.WARN_0005_3, delegate.getBeanClass().getName());
+                logger.log(Level.WARNING, OWBLogConst.WARN_0005_3, delegate.getBeanClass().getName());
             }
         }
 
-        if (logger.wblWillLogDebug())
+        if (logger.isLoggable(Level.FINE))
         {
-            logger.debug("Configuring interceptor class : [{0}]", delegate.getReturnType());
+            logger.log(Level.FINE, "Configuring interceptor class : [{0}]", delegate.getReturnType());
         }
         WebBeansInterceptor<T> interceptor = new WebBeansInterceptor<T>(delegate);
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java Mon Jul 16 19:56:23 2012
@@ -53,6 +53,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.logging.Level;
 
 /**
  * Defines the webbeans specific interceptors.
@@ -409,7 +410,7 @@ public class WebBeansInterceptor<T> exte
         }
         catch (Exception e)
         {
-            getLogger().error(e);
+            getLogger().log(Level.SEVERE, e.getMessage(), e);
             throw new WebBeansException(e);
         }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java Mon Jul 16 19:56:23 2012
@@ -19,6 +19,8 @@
 package org.apache.webbeans.lifecycle;
 
 import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.spi.BeanManager;
@@ -29,7 +31,6 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.config.WebBeansFinder;
 import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.container.InjectionResolver;
-import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.portable.events.discovery.BeforeShutdownImpl;
 import org.apache.webbeans.spi.ContainerLifecycle;
 import org.apache.webbeans.spi.ContextsService;
@@ -42,7 +43,7 @@ import org.apache.webbeans.xml.WebBeansX
 public abstract class AbstractLifeCycle implements ContainerLifecycle
 {
     //Logger instance
-    protected WebBeansLogger logger;
+    protected Logger logger;
     
     /**Discover bean classes*/
     protected ScannerService scannerService;
@@ -115,26 +116,29 @@ public abstract class AbstractLifeCycle 
         contextsService.init(startupObject);
         
         //Scanning process
-        logger.debug("Scanning classpaths for beans artifacts.");
+        logger.fine("Scanning classpaths for beans artifacts.");
 
         //Scan
         scannerService.scan();
         
         //Deploy beans
-        logger.debug("Deploying scanned beans.");
+        logger.fine("Deploying scanned beans.");
 
         //Deploy
         deployer.deploy(scannerService);
 
         //Start actual starting on sub-classes
         afterStartApplication(startupObject);
-        
-        logger.info(OWBLogConst.INFO_0001, Long.toString(System.currentTimeMillis() - begin));        
+
+        if (logger.isLoggable(Level.INFO))
+        {
+            logger.log(Level.INFO, OWBLogConst.INFO_0001, Long.toString(System.currentTimeMillis() - begin));
+        }
     }
 
     public void stopApplication(Object endObject)
     {
-        logger.debug("OpenWebBeans Container is stopping.");
+        logger.fine("OpenWebBeans Container is stopping.");
 
         try
         {
@@ -182,7 +186,10 @@ public abstract class AbstractLifeCycle 
         }
         catch (Exception e)
         {
-            logger.error(OWBLogConst.ERROR_0021, e);
+            if (logger.isLoggable(Level.SEVERE))
+            {
+                logger.log(Level.SEVERE, OWBLogConst.ERROR_0021, e);
+            }
         }
         
     }
@@ -190,7 +197,7 @@ public abstract class AbstractLifeCycle 
     /**
      * @return the logger
      */
-    protected WebBeansLogger getLogger()
+    protected Logger getLogger()
     {
         return logger;
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/StandaloneLifeCycle.java Mon Jul 16 19:56:23 2012
@@ -19,10 +19,11 @@
 package org.apache.webbeans.lifecycle;
 
 import java.util.Properties;
+import java.util.logging.Logger;
 
 import org.apache.webbeans.config.WebBeansFinder;
 import org.apache.webbeans.el.ELContextStore;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -30,7 +31,7 @@ import org.apache.webbeans.util.WebBeans
  */
 public class StandaloneLifeCycle extends AbstractLifeCycle
 {
-    public StandaloneLifeCycle(Properties properties, WebBeansLogger logger)
+    public StandaloneLifeCycle(Properties properties, Logger logger)
     {
         super(properties);
         this.logger = logger;
@@ -38,7 +39,7 @@ public class StandaloneLifeCycle extends
     
     public StandaloneLifeCycle()
     {
-        this(null, WebBeansLogger.getLogger(StandaloneLifeCycle.class));        
+        this(null, WebBeansLoggerFacade.getLogger(StandaloneLifeCycle.class));
     }
     
     @Override
@@ -80,4 +81,4 @@ public class StandaloneLifeCycle extends
     {
         WebBeansFinder.clearInstances(WebBeansUtil.getCurrentClassLoader());
     }
-}
\ No newline at end of file
+}

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java Mon Jul 16 19:56:23 2012
@@ -1,341 +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.webbeans.logger;
-
-/*
- * These are for use of JDK util logging.
- */
-import java.util.logging.Logger;
-import java.util.logging.Level;
- 
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.Serializable;
-import java.text.MessageFormat;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Wrapper class around the log4j logger class to include some checks before the
- * logs are actually written.
- * <p>
- * Actually, it is a thin layer on the log4j {@link Logger} implementation.
- * </p>
- *
- * @version $Rev$ $Date$
- */
-public final class WebBeansLogger implements Serializable, Externalizable
-{
-    /** Log level mappings from OWB DEBUG, TRACE, INFO, WARN, ERROR, FATAL to whatever log
-     *  levels the currently loaded logger supports (i.e. JUL provides FINEST, FINER, FINE,
-     *  CONFIG, INFO, WARNING, SEVERE).
-     */
-    /* JDK util logger mappings */
-    public static final Level WBL_DEBUG = Level.FINER;
-    public static final Level WBL_TRACE = Level.FINE;
-    public static final Level WBL_INFO = Level.INFO;
-    public static final Level WBL_WARN = Level.WARNING;
-    public static final Level WBL_ERROR = Level.SEVERE;
-    public static final Level WBL_FATAL = Level.SEVERE;
-       
-    /** Inner logger object to log actual log messages */
-    private transient Logger logger = null;
-    private transient ResourceBundle wbBundle = null;
-    private Class<?> caller = null;
-    private Locale locale = null;
-    
-    /** Private constructor */
-    public WebBeansLogger()
-    {
-        wbBundle = ResourceBundle.getBundle("openwebbeans/Messages");
-    }
-
-    /**
-     * Gets the new web beans logger instance.
-     * 
-     * @param clazz own the return logger
-     * @return new logger
-     */
-    public static WebBeansLogger getLogger(Class<?> clazz)
-    {
-        WebBeansLogger wbLogger = new WebBeansLogger();
-        wbLogger.caller = clazz;
-        Logger inLogger = Logger.getLogger(clazz.getName(),"openwebbeans/Messages");
-        wbLogger.setLogger(inLogger);
-
-        return wbLogger;
-    }
-
-    /**
-     * Gets the new web beans logger instance.
-     * 
-     * @param clazz own the return logger
-     * @param desiredLocale Locale used to select the Message resource bundle. 
-     * @return new logger
-     */
-    public static WebBeansLogger getLogger(Class<?> clazz, Locale desiredLocale)
-    {
-        WebBeansLogger wbLogger = new WebBeansLogger();
-        wbLogger.caller = clazz;
-        wbLogger.locale = desiredLocale;
-        Logger inLogger = Logger.getLogger(clazz.getName(), ResourceBundle.getBundle("openwebbeans/Messages", desiredLocale).toString());
-        wbLogger.setLogger(inLogger);
-
-        return wbLogger;
-    }
-
-    private void wblLog(Level level, String messageKey)
-    {
-        if (logger.isLoggable(level))
-        {
-            logger.logp(level, caller.getName(), Thread.currentThread().getStackTrace()[3].getMethodName(), messageKey);
-        }
-    }
-
-    private void wblLog(Level level, String messageKey, Object... args)
-    {
-        if (logger.isLoggable(level))
-        {
-            logger.logp(level, caller.getName(), Thread.currentThread().getStackTrace()[3].getMethodName(), messageKey, args);
-        }
-    }
-
-    private void wblLog(Level level, Throwable e, String messageKey)
-    {
-        if (logger.isLoggable(level))
-        {
-            logger.logp(level, caller.getName(), Thread.currentThread().getStackTrace()[3].getMethodName(), messageKey, e);
-        }
-    }
-
-    private void wblLog(Level level, Throwable e, String messageKey, Object... args)
-    {
-        if (logger.isLoggable(level))
-        {
-            logger.logp(level, caller.getName(), Thread.currentThread().getStackTrace()[3].getMethodName(), constructMessage(messageKey, args), e);
-        }
-    }
-    
-    public void fatal(String messageKey)
-    {
-        wblLog(WebBeansLogger.WBL_FATAL, messageKey);
-    }
-
-    public void fatal(String messageKey, Object... args)
-    {
-        wblLog(WebBeansLogger.WBL_FATAL, messageKey, args);
-    }
-
-    public void fatal(Throwable e, String messageKey)
-    {
-        wblLog(WebBeansLogger.WBL_FATAL, e, messageKey);
-    }
-
-    public void fatal(Throwable e, String messageKey, Object... args)
-    {
-        wblLog(WebBeansLogger.WBL_FATAL, e, messageKey, args);
-    }
-
-
-    public void error(Throwable e)
-    {
-        wblLog(WebBeansLogger.WBL_ERROR, e, "");
-    }
-
-    public void error(String messageKey)
-    {
-        wblLog(WebBeansLogger.WBL_ERROR, messageKey);
-    }
-
-    public void error(String messageKey, Object... args)
-    {
-        wblLog(WebBeansLogger.WBL_ERROR, messageKey, args);
-    }
-    
-    public void error(String messageKey, Throwable e)
-    {
-        wblLog(WebBeansLogger.WBL_ERROR, e, messageKey);
-    }
-
-    public void error(String messageKey, Throwable e, Object... args)
-    {
-        wblLog(WebBeansLogger.WBL_ERROR, e, messageKey, args);
-    }
-
-    public void warn(String messageKey)
-    {
-        wblLog(WebBeansLogger.WBL_WARN, messageKey);
-    }
-
-    public void warn(String messageKey, Object... args)
-    {
-        wblLog(WebBeansLogger.WBL_WARN, messageKey, args);
-    }
-
-    public void warn(String messageKey, Throwable e)
-    {
-        wblLog(WebBeansLogger.WBL_WARN, e, messageKey);
-    }
-
-    public void info(String messageKey)
-    {
-        wblLog(WebBeansLogger.WBL_INFO, messageKey);
-    }
-
-    public void info(String messageKey, Object... args)
-    {
-        wblLog(WebBeansLogger.WBL_INFO, messageKey, args);
-    }
-    
-    public void info(String messageKey, Throwable e)
-    {
-        wblLog(WebBeansLogger.WBL_INFO, e, messageKey);
-    }
-
-    public void debug(String messageKey)
-    {
-        wblLog(WebBeansLogger.WBL_DEBUG, messageKey);
-    }
-
-    public void debug(String messageKey, Throwable e)
-    {
-        wblLog(WebBeansLogger.WBL_DEBUG, e, messageKey);
-    }
-
-    public void debug(String messageKey, Object... args)
-    {
-        wblLog(WebBeansLogger.WBL_DEBUG, messageKey, args);
-    }
-
-    public void trace(String messageKey)
-    {
-        wblLog(WebBeansLogger.WBL_TRACE, messageKey);
-    }
-
-    public void trace(String messageKey, Object... args)
-    {
-        wblLog(WebBeansLogger.WBL_TRACE, messageKey, args);
-    }
-
-    public void trace(String messageKey, Throwable e)
-    {
-        wblLog(WebBeansLogger.WBL_TRACE, e, messageKey);
-    }
-
-    private String constructMessage(String messageKey, Object... args)
-    {
-        MessageFormat msgFrmt;
-        String formattedString;
-
-        msgFrmt = new MessageFormat(getTokenString(messageKey), Locale.getDefault());
-        formattedString = msgFrmt.format(args);
-
-        return formattedString;
-    }
-
-    public String getTokenString(String messageKey)
-    {
-        String strVal = null;
-
-        if (wbBundle == null)
-        {
-            throw new NullPointerException("ResourceBundle can not be null");
-        }
-        try
-        {
-            strVal = wbBundle.getString(messageKey);
-        }
-        catch (MissingResourceException mre)
-        {
-            strVal = null;
-        }
-        if (strVal == null)
-        {
-            return messageKey;
-        }
-
-        return strVal;
-    }
-
-    /**
-     * Sets the logger
-     * 
-     * @param logger new logger instance
-     */
-    public void setLogger(Logger logger)
-    {
-        this.logger = logger;
-    }
-
-    public boolean wblWillLogFatal()
-    {
-        return (logger.isLoggable(WebBeansLogger.WBL_FATAL));
-    }
-    
-    public boolean wblWillLogError()
-    {
-        return (logger.isLoggable(WebBeansLogger.WBL_ERROR));
-    }
-    
-    public boolean wblWillLogWarn()
-    {
-        return (logger.isLoggable(WebBeansLogger.WBL_WARN));
-    }
-    
-    public boolean wblWillLogInfo()
-    {
-        return (logger.isLoggable(WebBeansLogger.WBL_INFO));
-    }
-    
-    public boolean wblWillLogDebug()
-    {
-        return (logger.isLoggable(WebBeansLogger.WBL_DEBUG));
-    }
-    
-    public boolean wblWillLogTrace()
-    {
-        return (logger.isLoggable(WebBeansLogger.WBL_TRACE));
-    }
-
-    public void writeExternal(ObjectOutput out) throws IOException 
-    {
-        out.writeObject(caller);
-        out.writeObject(locale);
-    }
-
-    public void readExternal(ObjectInput in) throws IOException,
-            ClassNotFoundException 
-    {
-        caller = (Class<?>)in.readObject();
-        locale = (Locale)in.readObject();
-        Logger inLogger = null;
-        if (locale == null) 
-        {
-            inLogger = Logger.getLogger(caller.getName(),"openwebbeans/Messages");
-        } 
-        else
-        {
-            inLogger = Logger.getLogger(caller.getName(), ResourceBundle.getBundle("openwebbeans/Messages", locale).toString());
-        }
-        setLogger(inLogger);
-    }
-}

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/plugins/PluginLoader.java Mon Jul 16 19:56:23 2012
@@ -22,11 +22,13 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.spi.plugins.OpenWebBeansEjbPlugin;
 import org.apache.webbeans.spi.plugins.OpenWebBeansJavaEEPlugin;
 import org.apache.webbeans.spi.plugins.OpenWebBeansPlugin;
@@ -47,7 +49,7 @@ import org.apache.webbeans.spi.plugins.O
 public class PluginLoader
 {
     /**Logger instance*/
-    private  final WebBeansLogger logger = WebBeansLogger.getLogger(PluginLoader.class);
+    private  final Logger logger = WebBeansLoggerFacade.getLogger(PluginLoader.class);
 
     /** unmodifiable list with all found OWB plugins */
     private List<OpenWebBeansPlugin> plugins = null;
@@ -76,15 +78,15 @@ public class PluginLoader
     {
         if(started.compareAndSet(false, true))
         {
-            logger.debug("PluginLoader startUp called.");
+            logger.fine("PluginLoader startUp called.");
             ArrayList<OpenWebBeansPlugin> ps = new ArrayList<OpenWebBeansPlugin>();
 
             List<OpenWebBeansPlugin> pluginList = WebBeansContext.getInstance().getLoaderService().load(OpenWebBeansPlugin.class);
             for (OpenWebBeansPlugin plugin : pluginList)
             {
-                if (logger.wblWillLogInfo())
+                if (logger.isLoggable(Level.INFO))
                 {
-                    logger.info(OWBLogConst.INFO_0004, plugin.getClass().getSimpleName());
+                    logger.log(Level.INFO, OWBLogConst.INFO_0004, plugin.getClass().getSimpleName());
                 }
                 try
                 {
@@ -102,7 +104,7 @@ public class PluginLoader
         }
         else
         {
-            logger.debug("PluginLoader is already started.");
+            logger.fine("PluginLoader is already started.");
         }
     }
     
@@ -127,11 +129,11 @@ public class PluginLoader
     {
         if(started.compareAndSet(true, false))
         {
-            logger.debug("PluginLoader shutDown called.");
+            logger.fine("PluginLoader shutDown called.");
             
             if (plugins == null)
             {
-                logger.warn(OWBLogConst.WARN_0001);
+                logger.warning(OWBLogConst.WARN_0001);
                 return;
             }
 
@@ -147,19 +149,19 @@ public class PluginLoader
                 {
                     // we catch ALL exceptions, since we like to continue shutting down all other plugins!
                     String pluginName = plugin.getClass().getSimpleName();
-                    logger.error(OWBLogConst.ERROR_0009, e, pluginName);
+                    logger.log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0009, pluginName), e);
                     failedShutdown.add(pluginName);
                 }
             }
             
             if (!failedShutdown.isEmpty())
             {
-                throw new WebBeansConfigurationException(logger.getTokenString(OWBLogConst.EXCEPT_0006) + failedShutdown.toString());
+                throw new WebBeansConfigurationException(WebBeansLoggerFacade.getTokenString(OWBLogConst.EXCEPT_0006) + failedShutdown.toString());
             }            
         }
         else
         {
-            logger.debug("PluginLoader is already shut down.");
+            logger.fine("PluginLoader is already shut down.");
         }
     }
     

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java Mon Jul 16 19:56:23 2012
@@ -23,6 +23,8 @@ import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.enterprise.inject.spi.AnnotatedConstructor;
 import javax.enterprise.inject.spi.AnnotatedField;
@@ -31,7 +33,7 @@ import javax.enterprise.inject.spi.Annot
 
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.util.Asserts;
 
 /**
@@ -43,7 +45,7 @@ public final class AnnotatedElementFacto
 {
 
     // Logger instance
-    private final WebBeansLogger logger = WebBeansLogger.getLogger(AnnotatedElementFactory.class);
+    private final Logger logger = WebBeansLoggerFacade.getLogger(AnnotatedElementFactory.class);
 
     @Deprecated
     public static AnnotatedElementFactory getInstance()
@@ -132,9 +134,9 @@ public final class AnnotatedElementFacto
             {
                 if (e instanceof ClassNotFoundException || e instanceof ArrayStoreException)
                 {
-                    if (logger.wblWillLogError())
+                    if (logger.isLoggable(Level.SEVERE))
                     {
-                        logger.error(OWBLogConst.ERROR_0027, e, annotatedClass.getName(), e.getCause());
+                        logger.log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0027, annotatedClass.getName(), e.getCause()), e);
                     }
 
                     annotatedType = null;
@@ -146,9 +148,9 @@ public final class AnnotatedElementFacto
             } 
             catch (NoClassDefFoundError ncdfe)
             {
-                if (logger.wblWillLogError())
+                if (logger.isLoggable(Level.SEVERE))
                 {
-                    logger.error(OWBLogConst.ERROR_0027, ncdfe, annotatedClass.getName(), ncdfe.getCause());
+                    logger.log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0027, annotatedClass.getName(), ncdfe.getCause()), ncdfe);
                 }
 
                 annotatedType = null;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/discovery/AfterBeanDiscoveryImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/discovery/AfterBeanDiscoveryImpl.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/discovery/AfterBeanDiscoveryImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/discovery/AfterBeanDiscoveryImpl.java Mon Jul 16 19:56:23 2012
@@ -35,11 +35,14 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.container.BeanManagerImpl;
 import org.apache.webbeans.decorator.WebBeansDecorator;
 import org.apache.webbeans.intercept.custom.CustomInterceptor;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.portable.events.generics.GProcessBean;
 import org.apache.webbeans.portable.events.generics.GProcessObservableMethod;
 import org.apache.webbeans.util.AnnotationUtil;
 
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 /**
  * Event that is fired by the container after it discovers beans.
  * 
@@ -50,7 +53,7 @@ public class AfterBeanDiscoveryImpl impl
 {
     private BeanManagerImpl beanManager = null;
     
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(AfterBeanDiscoveryImpl.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(AfterBeanDiscoveryImpl.class);
     private final WebBeansContext webBeansContext;
 
     public AfterBeanDiscoveryImpl(WebBeansContext webBeansContext)
@@ -81,25 +84,25 @@ public class AfterBeanDiscoveryImpl impl
             CustomInterceptor<?> interceptor = new CustomInterceptor(managedBean, (Interceptor<?>)bean);
             if(interceptor.getScope() != Dependent.class)
             {
-                if(logger.wblWillLogWarn())
+                if(logger.isLoggable(Level.WARNING))
                 {
-                    logger.warn(OWBLogConst.WARN_0005_1, interceptor.getBeanClass().getName());
+                    logger.log(Level.WARNING, OWBLogConst.WARN_0005_1, interceptor.getBeanClass().getName());
                 }
             }
             
             if(interceptor.getName() != null)
             {
-                if(logger.wblWillLogWarn())
+                if(logger.isLoggable(Level.WARNING))
                 {
-                    logger.warn(OWBLogConst.WARN_0005_2, interceptor.getBeanClass().getName());
+                    logger.log(Level.WARNING, OWBLogConst.WARN_0005_2, interceptor.getBeanClass().getName());
                 }
             }
             
             if(interceptor.isAlternative())
             {
-                if(logger.wblWillLogWarn())
+                if(logger.isLoggable(Level.WARNING))
                 {
-                    logger.warn(OWBLogConst.WARN_0005_3, interceptor.getBeanClass().getName());
+                    logger.log(Level.WARNING, OWBLogConst.WARN_0005_3, interceptor.getBeanClass().getName());
                 }                
             }
 
@@ -115,25 +118,25 @@ public class AfterBeanDiscoveryImpl impl
                     (AnnotatedType<?>) annotatedType);
             if(managedBean.getScope() != Dependent.class)
             {
-                if(logger.wblWillLogWarn())
+                if(logger.isLoggable(Level.WARNING))
                 {
-                    logger.warn(OWBLogConst.WARN_0005_1, managedBean.getBeanClass().getName());
+                    logger.log(Level.WARNING, OWBLogConst.WARN_0005_1, managedBean.getBeanClass().getName());
                 }
             }
             
             if(managedBean.getName() != null)
             {
-                if(logger.wblWillLogWarn())
+                if(logger.isLoggable(Level.WARNING))
                 {
-                    logger.warn(OWBLogConst.WARN_0005_2, managedBean.getBeanClass().getName());
+                    logger.log(Level.WARNING, OWBLogConst.WARN_0005_2, managedBean.getBeanClass().getName());
                 }
             }
             
             if(managedBean.isAlternative())
             {
-                if(logger.wblWillLogWarn())
+                if(logger.isLoggable(Level.WARNING))
                 {
-                    logger.warn(OWBLogConst.WARN_0005_3, managedBean.getBeanClass().getName());
+                    logger.log(Level.WARNING, OWBLogConst.WARN_0005_3, managedBean.getBeanClass().getName());
                 }                
             }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/discovery/ErrorStack.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/discovery/ErrorStack.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/discovery/ErrorStack.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/discovery/ErrorStack.java Mon Jul 16 19:56:23 2012
@@ -20,8 +20,10 @@ package org.apache.webbeans.portable.eve
 
 import java.util.Iterator;
 import java.util.Stack;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 
 /**
  * Error stack.
@@ -30,7 +32,7 @@ import org.apache.webbeans.logger.WebBea
  */
 public class ErrorStack
 {
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(ErrorStack.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(ErrorStack.class);
     
     private Stack<Throwable> errorStack = new Stack<Throwable>();
     
@@ -60,7 +62,7 @@ public class ErrorStack
             while(it.hasNext())
             {
                 Throwable t = it.next();
-                logger.error(t);
+                logger.log(Level.SEVERE, t.getMessage(), t);
             }
         }
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/service/DefaultLoaderService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/service/DefaultLoaderService.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/service/DefaultLoaderService.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/service/DefaultLoaderService.java Mon Jul 16 19:56:23 2012
@@ -18,13 +18,14 @@
  */
 package org.apache.webbeans.service;
 
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.spi.LoaderService;
 import org.apache.webbeans.util.WebBeansUtil;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.ServiceLoader;
+import java.util.logging.Logger;
 
 /**
  * Default implementation which delegates to the s{@link ServiceLoader} of Java 1.6 and
@@ -32,7 +33,7 @@ import java.util.ServiceLoader;
  */
 public class DefaultLoaderService implements LoaderService
 {
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(DefaultLoaderService.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(DefaultLoaderService.class);
 
     private static final boolean JAVA_6_AVAILABLE = isJava6();
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java Mon Jul 16 19:56:23 2012
@@ -34,6 +34,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.spi.InjectionPoint;
@@ -42,7 +44,7 @@ import javax.inject.Provider;
 import org.apache.webbeans.config.BeanTypeSetResolver;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.exception.WebBeansException;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 
 /**
  * Utility classes with respect to the class operations.
@@ -55,7 +57,7 @@ public final class ClassUtil
 {
     public static final Map<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPERS_MAP = new HashMap<Class<?>, Class<?>>();
 
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(ClassUtil.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(ClassUtil.class);
 
     static
     {
@@ -99,7 +101,7 @@ public final class ClassUtil
             }
             
             String error = "Error occurred while creating an instance of class : " + clazz.getName(); 
-            logger.error(error, cause);
+            logger.log(Level.SEVERE, error, cause);
             throw new WebBeansException(error,cause); 
         
         }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java Mon Jul 16 19:56:23 2012
@@ -25,15 +25,18 @@ import javax.naming.NamingException;
 
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.exception.WebBeansException;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * This is the internal helper class for low level access to JNDI
- * @see org.apache.webbeans.corespi.JNDIService for transparent access over SPI 
+ * @see org.apache.webbeans.spi.JNDIService for transparent access over SPI
  */
 public final class JNDIUtil
 {
-    private static final WebBeansLogger LOGGER = WebBeansLogger.getLogger(JNDIUtil.class);
+    private static final Logger LOGGER = WebBeansLoggerFacade.getLogger(JNDIUtil.class);
 
     private JNDIUtil()
     {
@@ -70,7 +73,7 @@ public final class JNDIUtil
         }
         catch (NamingException e)
         {
-            LOGGER.error(OWBLogConst.ERROR_0005, e, name);
+            LOGGER.log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0005, name), e);
         }
     }
 
@@ -85,8 +88,8 @@ public final class JNDIUtil
         }
         catch (NamingException e)
         {
-            LOGGER.error(e);
-            throw new WebBeansException(LOGGER.getTokenString(OWBLogConst.EXCEPT_0009) + name, e);
+            LOGGER.log(Level.SEVERE, e.getMessage(), e);
+            throw new WebBeansException(WebBeansLoggerFacade.getTokenString(OWBLogConst.EXCEPT_0009) + name, e);
         }
     }
     
@@ -101,8 +104,8 @@ public final class JNDIUtil
         }
         catch (NamingException e)
         {
-            LOGGER.error(e);
-            throw new WebBeansException(LOGGER.getTokenString(OWBLogConst.EXCEPT_0010) + name, e);
+            LOGGER.log(Level.SEVERE, e.getMessage(), e);
+            throw new WebBeansException(WebBeansLoggerFacade.getTokenString(OWBLogConst.EXCEPT_0010) + name, e);
         }
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java Mon Jul 16 19:56:23 2012
@@ -35,7 +35,7 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.container.InjectionResolver;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.inject.impl.InjectionPointFactory;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.spi.api.ResourceReference;
 
 import javax.decorator.Delegate;
@@ -67,12 +67,14 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import static org.apache.webbeans.util.InjectionExceptionUtils.throwUnsatisfiedResolutionException;
 
 public final class WebBeansAnnotatedTypeUtil
 {
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansAnnotatedTypeUtil.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(WebBeansAnnotatedTypeUtil.class);
 
     private final WebBeansContext webBeansContext;
 
@@ -733,7 +735,7 @@ public final class WebBeansAnnotatedType
         catch(Exception e)
         {
             String message = "Error is occured while getting injection points for the Java EE component instance class, " + type.getJavaClass(); 
-            logger.error(message,e);
+            logger.log(Level.SEVERE, message, e);
             throw new IllegalArgumentException(message, e);
         }
     }
@@ -743,6 +745,6 @@ public final class WebBeansAnnotatedType
     @Deprecated
     public static <X> Method getDisposalWithGivenAnnotatedMethod(AnnotatedType<X> annotatedType, Type beanType, Annotation[] qualifiers)
     {
-        return WebBeansContext.getInstance().getAnnotationManager().getDisposalWithGivenAnnotatedMethod(annotatedType, beanType, qualifiers);
+        return WebBeansContext.currentInstance().getAnnotationManager().getDisposalWithGivenAnnotatedMethod(annotatedType, beanType, qualifiers);
     }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java Mon Jul 16 19:56:23 2012
@@ -39,6 +39,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 
 import javax.annotation.PostConstruct;
@@ -141,7 +143,7 @@ import org.apache.webbeans.inject.Altern
 import org.apache.webbeans.intercept.InterceptorData;
 import org.apache.webbeans.intercept.InterceptorDataImpl;
 import org.apache.webbeans.intercept.InterceptorType;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.plugins.OpenWebBeansEjbLCAPlugin;
 import org.apache.webbeans.plugins.PluginLoader;
 import org.apache.webbeans.portable.creation.InjectionTargetProducer;
@@ -172,7 +174,7 @@ import static org.apache.webbeans.util.I
 @SuppressWarnings("unchecked")
 public final class WebBeansUtil
 {
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansUtil.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(WebBeansUtil.class);
 
     /**
      * Enforcing that interceptor callbacks should not be
@@ -1575,7 +1577,7 @@ public final class WebBeansUtil
         ProducerMethodBean pLeft;
         ProducerMethodBean pRight;
 
-        logger.debug("configure Specialized producer beans has started.");
+        logger.fine("configure Specialized producer beans has started.");
 
         // collect all producer method beans
         Set<Bean<?>> beans = webBeansContext.getBeanManagerImpl().getBeans();
@@ -2599,8 +2601,8 @@ public final class WebBeansUtil
         //Define meta-data
         managedBeanCreator.defineStereoTypes();
         //Scope type
-        managedBeanCreator.defineScopeType(logger.getTokenString(OWBLogConst.TEXT_MB_IMPL) + clazz.getName() +
-                                           logger.getTokenString(OWBLogConst.TEXT_SAME_SCOPE), allowLazyInit);
+        managedBeanCreator.defineScopeType(WebBeansLoggerFacade.getTokenString(OWBLogConst.TEXT_MB_IMPL) + clazz.getName() +
+                WebBeansLoggerFacade.getTokenString(OWBLogConst.TEXT_SAME_SCOPE), allowLazyInit);
 
         managedBeanCreator.defineSerializable();
 
@@ -2755,8 +2757,8 @@ public final class WebBeansUtil
         managedBeanCreator.defineStereoTypes();
 
         //Scope type
-        managedBeanCreator.defineScopeType(logger.getTokenString(OWBLogConst.TEXT_MB_IMPL) + clazz.getName() +
-                logger.getTokenString(OWBLogConst.TEXT_SAME_SCOPE), false);
+        managedBeanCreator.defineScopeType(WebBeansLoggerFacade.getTokenString(OWBLogConst.TEXT_MB_IMPL) + clazz.getName() +
+                WebBeansLoggerFacade.getTokenString(OWBLogConst.TEXT_SAME_SCOPE), false);
 
         managedBeanCreator.defineSerializable();
 
@@ -2922,8 +2924,8 @@ public final class WebBeansUtil
         managedBeanCreator.defineStereoTypes();
 
         //Scope type
-        managedBeanCreator.defineScopeType(logger.getTokenString(OWBLogConst.TEXT_MB_IMPL) + clazz.getName()
-                                           + logger.getTokenString(OWBLogConst.TEXT_SAME_SCOPE), false);
+        managedBeanCreator.defineScopeType(WebBeansLoggerFacade.getTokenString(OWBLogConst.TEXT_MB_IMPL) + clazz.getName()
+                                           + WebBeansLoggerFacade.getTokenString(OWBLogConst.TEXT_SAME_SCOPE), false);
 
         managedBeanCreator.defineSerializable();
 
@@ -3018,9 +3020,9 @@ public final class WebBeansUtil
             }
             else
             {
-                if (logger.wblWillLogTrace())
+                if (logger.isLoggable(Level.FINEST))
                 {
-                    logger.trace("Unable to configure decorator with class : [{0}]", annotatedType.getJavaClass());
+                    logger.log(Level.FINEST, "Unable to configure decorator with class : [{0}]", annotatedType.getJavaClass());
                 }
             }
         }
@@ -3046,9 +3048,9 @@ public final class WebBeansUtil
             }
             else
             {
-                if (logger.wblWillLogTrace())
+                if (logger.isLoggable(Level.FINEST))
                 {
-                    logger.trace("Unable to configure interceptor with class : [{0}]", annotatedType.getJavaClass());
+                    logger.log(Level.FINEST, "Unable to configure interceptor with class : [{0}]", annotatedType.getJavaClass());
                 }
             }
         }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java Mon Jul 16 19:56:23 2012
@@ -19,11 +19,14 @@
 package org.apache.webbeans.xml;
 
 import org.apache.webbeans.exception.WebBeansException;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 /**
  * Implementation of the {@link ErrorHandler} .
  * <p>
@@ -35,23 +38,23 @@ import org.xml.sax.SAXParseException;
  */
 public class WebBeansErrorHandler implements ErrorHandler
 {
-    private static WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansErrorHandler.class);
+    private static Logger logger = WebBeansLoggerFacade.getLogger(WebBeansErrorHandler.class);
 
     public void error(SAXParseException exception) throws SAXException
     {
-        logger.error(exception.getMessage(), exception.getCause());
+        logger.log(Level.SEVERE, exception.getMessage(), exception.getCause());
         throw new WebBeansException(exception);
     }
 
     public void fatalError(SAXParseException exception) throws SAXException
     {
-        logger.fatal(exception.getCause(), exception.getMessage());
+        logger.log(Level.SEVERE, exception.getMessage(), exception.getCause());
         throw new WebBeansException(exception);
     }
 
     public void warning(SAXParseException exception) throws SAXException
     {
-        logger.debug(exception.getMessage(), exception.getCause());
+        logger.log(Level.FINE, exception.getMessage(), exception.getCause());
     }
 
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java Mon Jul 16 19:56:23 2012
@@ -23,6 +23,8 @@ import java.io.InputStream;
 import java.lang.annotation.Annotation;
 import java.util.HashSet;
 import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.enterprise.inject.spi.AnnotatedType;
 import javax.interceptor.Interceptor;
@@ -36,7 +38,7 @@ import org.apache.webbeans.exception.Web
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.inject.AlternativesManager;
 import org.apache.webbeans.intercept.InterceptorsManager;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.portable.events.ProcessAnnotatedTypeImpl;
 import org.apache.webbeans.spi.ScannerService;
 import org.apache.webbeans.util.AnnotationUtil;
@@ -53,7 +55,7 @@ import org.w3c.dom.NodeList;
 @SuppressWarnings("unchecked")
 public final class WebBeansXMLConfigurator
 {
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansXMLConfigurator.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(WebBeansXMLConfigurator.class);
 
     /**
      * Current configuration file name
@@ -191,8 +193,8 @@ public final class WebBeansXMLConfigurat
         }
         catch (Exception e)
         {
-            logger.fatal(e, OWBLogConst.FATAL_0002);
-            throw new WebBeansException(logger.getTokenString(OWBLogConst.EXCEPT_0013), e);
+            logger.log(Level.SEVERE, OWBLogConst.FATAL_0002, e);
+            throw new WebBeansException(WebBeansLoggerFacade.getTokenString(OWBLogConst.EXCEPT_0013), e);
         }
     }
 
@@ -323,7 +325,7 @@ public final class WebBeansXMLConfigurat
                 if ((!isBDAScanningEnabled && manager.isInterceptorEnabled(clazz)) ||
                         (isBDAScanningEnabled && !scanner.getBDABeansXmlScanner().addInterceptor(clazz, fileName)))
                 {
-                    logger.warn( "Interceptor class : " + child.getTextContent().trim() + " is already defined");
+                    logger.warning( "Interceptor class : " + child.getTextContent().trim() + " is already defined");
                 }
                 else
                 {
@@ -411,9 +413,9 @@ public final class WebBeansXMLConfigurat
             }
             else
             {
-                if (logger.wblWillLogWarn())
+                if (logger.isLoggable(Level.WARNING))
                 {
-                    logger.warn(OWBLogConst.WARN_0002, getName(child));
+                    logger.log(Level.WARNING, OWBLogConst.WARN_0002, getName(child));
                 }
             }
         }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/el/ELPerformanceTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/el/ELPerformanceTest.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/el/ELPerformanceTest.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/el/ELPerformanceTest.java Mon Jul 16 19:56:23 2012
@@ -22,10 +22,12 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.el.WebBeansELResolver;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.junit.Assert;
 import org.junit.Test;
@@ -38,7 +40,7 @@ public class ELPerformanceTest extends A
     private final static int ITERATIONS = 200;
 
 
-    private static WebBeansLogger logger = WebBeansLogger.getLogger(ELPerformanceTest.class);
+    private static Logger logger = WebBeansLoggerFacade.getLogger(ELPerformanceTest.class);
 
     /**
      * Test our bean creation for thread safety.
@@ -74,7 +76,7 @@ public class ELPerformanceTest extends A
         
         long end = System.nanoTime();
 
-        logger.info("Executing {0} threads with {1} iterations took {2} ns", THREADS, ITERATIONS, end - start);
+        logger.log(Level.INFO, "Executing {0} threads with {1} iterations took {2} ns", WebBeansLoggerFacade.args(THREADS, ITERATIONS, end - start));
         
         shutDownContainer();
     }
@@ -107,7 +109,7 @@ public class ELPerformanceTest extends A
             }
             catch(RuntimeException e)
             {
-                logger.error(e);
+                logger.log(Level.SEVERE, e.getMessage(), e);
                 Assert.fail("got an exception: " + e.getMessage());
                 throw e;
             }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/injectionpoint/beans/PropertyHolderFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/injectionpoint/beans/PropertyHolderFactory.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/injectionpoint/beans/PropertyHolderFactory.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/injection/injectionpoint/beans/PropertyHolderFactory.java Mon Jul 16 19:56:23 2012
@@ -21,11 +21,13 @@ package org.apache.webbeans.newtests.inj
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import javax.enterprise.inject.Produces;
 import javax.enterprise.inject.spi.InjectionPoint;
 import javax.inject.Inject;
 import org.apache.webbeans.config.PropertyLoader;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 
 /**
  * Factory class for PropertyHolder Annotation. 
@@ -33,7 +35,7 @@ import org.apache.webbeans.logger.WebBea
  */
 public class PropertyHolderFactory {
 
-    private static final WebBeansLogger logger = WebBeansLogger.getLogger(PropertyHolderFactory.class);
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(PropertyHolderFactory.class);
     
     //Properties
     private static final String PROPERTY_FILE = 
@@ -72,7 +74,7 @@ public class PropertyHolderFactory {
     @PropertyHolder
     public String getPlaceHolderValue(InjectionPoint injectionPoint) {
 
-        logger.info("getPlaceHolderValue {0}", injectionPoint);
+        logger.log(Level.INFO, "getPlaceHolderValue {0}", injectionPoint);
 
         //Get value attribute of the PlaceHolder Annotation
         String keyName = injectionPoint.getAnnotated().getAnnotation(PropertyHolder.class).value();
@@ -168,4 +170,4 @@ public class PropertyHolderFactory {
         }
         return null;
     }
-}
\ No newline at end of file
+}

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/InterceptorPerformanceTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/InterceptorPerformanceTest.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/InterceptorPerformanceTest.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/interceptors/business/tests/InterceptorPerformanceTest.java Mon Jul 16 19:56:23 2012
@@ -20,7 +20,7 @@ package org.apache.webbeans.newtests.int
 
 import junit.framework.Assert;
 import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.newtests.interceptors.beans.ApplicationScopedBean;
 import org.apache.webbeans.newtests.interceptors.beans.RequestScopedBean;
@@ -32,6 +32,8 @@ import javax.enterprise.inject.spi.Bean;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * This test checks the performance of simple interceptor invocations.
@@ -45,7 +47,7 @@ public class InterceptorPerformanceTest 
     private static final int ITERATIONS = 1000;
     private static final int NUM_THREADS = 50;
 
-    private static WebBeansLogger logger = WebBeansLogger.getLogger(InterceptorPerformanceTest.class);
+    private static Logger logger = WebBeansLoggerFacade.getLogger(InterceptorPerformanceTest.class);
 
 
     @Test
@@ -82,7 +84,7 @@ public class InterceptorPerformanceTest 
 
         long end = System.nanoTime();
 
-        logger.info("Executing {0} iterations took {1} ns", ITERATIONS, end - start);
+        logger.log(Level.INFO, "Executing {0} iterations took {1} ns", WebBeansLoggerFacade.args(ITERATIONS, end - start));
 
         shutDownContainer();
 
@@ -147,7 +149,7 @@ public class InterceptorPerformanceTest 
             }
             catch (Exception e)
             {
-                logger.error("Concurrency problem in InterceptorPerformanceTest detected in thread " + threadName, e);
+                logger.log(Level.SEVERE, "Concurrency problem in InterceptorPerformanceTest detected in thread " + threadName, e);
                 failed = true;
             }
         }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/TestContext.java Mon Jul 16 19:56:23 2012
@@ -24,6 +24,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
+import java.util.logging.Logger;
 
 import javax.decorator.Decorator;
 import javax.enterprise.context.Dependent;
@@ -44,7 +45,7 @@ import org.apache.webbeans.context.Depen
 import org.apache.webbeans.decorator.DecoratorUtil;
 import org.apache.webbeans.decorator.WebBeansDecoratorConfig;
 import org.apache.webbeans.deployment.StereoTypeModel;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.newtests.AbstractUnitTest;
 import org.apache.webbeans.portable.events.generics.GProcessAnnotatedType;
 import org.apache.webbeans.test.component.decorator.broken.DelegateAttributeIsnotInterface;
@@ -63,7 +64,6 @@ import org.apache.webbeans.test.sterotyp
 import org.apache.webbeans.test.sterotype.StereoWithRequestScope;
 import org.apache.webbeans.test.sterotype.StereoWithSessionScope;
 import org.apache.webbeans.test.sterotype.StereoWithSessionScope2;
-import org.apache.webbeans.util.WebBeansUtil;
 import org.apache.webbeans.xml.WebBeansXMLConfigurator;
 
 /**
@@ -81,7 +81,7 @@ import org.apache.webbeans.xml.WebBeansX
  */
 public abstract class TestContext implements ITestContext
 {
-    private WebBeansLogger logger = WebBeansLogger.getLogger(TestContext.class);
+    private Logger logger = WebBeansLoggerFacade.getLogger(TestContext.class);
 
     /**
      * All unit test classes. It is defined for starting the tests from the
@@ -219,7 +219,7 @@ public abstract class TestContext implem
      */
     public void fail(String methodName)
     {
-        logger.error("Test Class: " + clazzName + ",Method Name: " + methodName + " is FAILED");
+        logger.severe("Test Class: " + clazzName + ",Method Name: " + methodName + " is FAILED");
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestListener.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestListener.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/servlet/TestListener.java Mon Jul 16 19:56:23 2012
@@ -18,10 +18,12 @@
  */
 package org.apache.webbeans.test.servlet;
 
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.test.TestContext;
 import org.junit.Test;
 
+import java.util.logging.Logger;
+
 /**
  * This test listener class is used for running the tests from the web page.
  * <p>
@@ -33,7 +35,7 @@ import org.junit.Test;
  */
 public class TestListener
 {
-    WebBeansLogger log = WebBeansLogger.getLogger(TestListener.class);
+    Logger log = WebBeansLoggerFacade.getLogger(TestListener.class);
 
     private void init()
     {

Modified: openwebbeans/trunk/webbeans-jee5-ejb-resource/src/main/java/org/apache/webbeans/resource/spi/ee/ExtendedStandaloneResourceInjectionService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jee5-ejb-resource/src/main/java/org/apache/webbeans/resource/spi/ee/ExtendedStandaloneResourceInjectionService.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jee5-ejb-resource/src/main/java/org/apache/webbeans/resource/spi/ee/ExtendedStandaloneResourceInjectionService.java (original)
+++ openwebbeans/trunk/webbeans-jee5-ejb-resource/src/main/java/org/apache/webbeans/resource/spi/ee/ExtendedStandaloneResourceInjectionService.java Mon Jul 16 19:56:23 2012
@@ -21,7 +21,7 @@ package org.apache.webbeans.resource.spi
 import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.container.BeanManagerImpl;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.resource.spi.se.StandaloneResourceInjectionService;
 import org.apache.webbeans.spi.api.ResourceReference;
 
@@ -34,13 +34,15 @@ import java.lang.annotation.Annotation;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * Allows to use @EJB in JEE 5 app servers
  */
 public class ExtendedStandaloneResourceInjectionService extends StandaloneResourceInjectionService
 {
-    private final WebBeansLogger logger = WebBeansLogger.getLogger(ExtendedStandaloneResourceInjectionService.class);
+    private final Logger logger = WebBeansLoggerFacade.getLogger(ExtendedStandaloneResourceInjectionService.class);
 
     private List<EjbResolver> ejbResolvers = new ArrayList<EjbResolver>();
 
@@ -75,9 +77,9 @@ public class ExtendedStandaloneResourceI
                 }
                 catch (NamingException e)
                 {
-                    if(logger.wblWillLogDebug())
+                    if(logger.isLoggable(Level.FINE))
                     {
-                        logger.debug(ejbResolver.getClass().getName()
+                        logger.log(Level.FINE, ejbResolver.getClass().getName()
                                 + " couldn't find EJB for " + resourceReference.getResourceType().getName());
                     }
                 }
@@ -119,7 +121,7 @@ public class ExtendedStandaloneResourceI
 
             if (!beansIterator.hasNext())
             {
-                logger.error(e);
+                logger.log(Level.SEVERE, "can't find ejb (via jndi) or cdi bean for type " + resourceType.getName(), e);
                 throw new RuntimeException("can't find ejb (via jndi) or cdi bean for type "
                         + resourceType.getName(), e);
             }

Modified: openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java (original)
+++ openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java Mon Jul 16 19:56:23 2012
@@ -19,6 +19,7 @@
 package org.apache.webbeans.jms.component;
 
 import java.lang.reflect.Method;
+import java.util.logging.Level;
 
 import javax.enterprise.context.spi.CreationalContext;
 import org.apache.webbeans.component.AbstractOwbBean;
@@ -28,6 +29,7 @@ import org.apache.webbeans.config.OWBLog
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.jms.JMSModel;
 import org.apache.webbeans.jms.util.Closable;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
 
 public class JmsBean<T> extends AbstractOwbBean<T> implements JmsBeanMarker
 {
@@ -60,7 +62,7 @@ public class JmsBean<T> extends Abstract
         
         catch (Exception e)
         {
-            getLogger().error(OWBLogConst.ERROR_0010, e); 
+            logger.log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0010, e));
         }
 }
         

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java?rev=1362228&r1=1362227&r2=1362228&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java (original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java Mon Jul 16 19:56:23 2012
@@ -30,7 +30,10 @@ import org.apache.webbeans.context.Conte
 import org.apache.webbeans.context.ConversationContext;
 import org.apache.webbeans.conversation.ConversationImpl;
 import org.apache.webbeans.conversation.ConversationManager;
-import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * Conversation related phase listener.
@@ -43,7 +46,7 @@ public class WebBeansPhaseListener imple
     private static final long serialVersionUID = 1L;
 
     /**Logger instance*/
-    private final WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansPhaseListener.class);
+    private final Logger logger = WebBeansLoggerFacade.getLogger(WebBeansPhaseListener.class);
 
     private Boolean owbApplication = null;
 
@@ -66,9 +69,9 @@ public class WebBeansPhaseListener imple
 
             if (conversation.isTransient())
             {
-                if (logger.wblWillLogDebug())
+                if (logger.isLoggable(Level.FINE))
                 {
-                    logger.debug("Destroying the conversation context with cid : [{0}]", conversation.getId());
+                    logger.log(Level.FINE, "Destroying the conversation context with cid : [{0}]", conversation.getId());
                 }
                 ContextFactory contextFactory = webBeansContext.getContextFactory();
                 contextFactory.destroyConversationContext();
@@ -102,9 +105,9 @@ public class WebBeansPhaseListener imple
 
             if (conversation.isTransient())
             {
-                if (logger.wblWillLogDebug())
+                if (logger.isLoggable(Level.FINE))
                 {
-                    logger.debug("Creating a new transitional conversation with cid : [{0}]", conversation.getId());
+                    logger.log(Level.FINE, "Creating a new transitional conversation with cid : [{0}]", conversation.getId());
                 }
                 contextFactory.initConversationContext(null);
 
@@ -116,9 +119,9 @@ public class WebBeansPhaseListener imple
             }
             else
             {
-                if (logger.wblWillLogDebug())
+                if (logger.isLoggable(Level.FINE))
                 {
-                    logger.debug("Restoring conversation with cid : [{0}]", conversation.getId());
+                    logger.log(Level.FINE, "Restoring conversation with cid : [{0}]", conversation.getId());
                 }
 
                 //Conversation must be used by one thread at a time



Mime
View raw message