abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject svn commit: r470892 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/DefaultServiceContext.java
Date Fri, 03 Nov 2006 16:42:35 GMT
Author: ugo
Date: Fri Nov  3 08:42:34 2006
New Revision: 470892

URL: http://svn.apache.org/viewvc?view=rev&rev=470892
Log:
Log objects returned by ServiceUtil for debugging the configuration.

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/DefaultServiceContext.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/DefaultServiceContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/DefaultServiceContext.java?view=diff&rev=470892&r1=470891&r2=470892
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/DefaultServiceContext.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/DefaultServiceContext.java
Fri Nov  3 08:42:34 2006
@@ -26,14 +26,22 @@
 import org.apache.abdera.protocol.server.util.ServerConstants;
 import org.apache.abdera.protocol.server.util.SimpleSubjectResolver;
 import org.apache.abdera.util.ServiceUtil;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class DefaultServiceContext 
   extends AbstractServiceContext
   implements ServerConstants {
 
+  private static final Log logger = LogFactory.getLog(DefaultServiceContext.class);
+  
   private Object instance(String id, String _default) {
     String instance = getProperty(id);
-    return ServiceUtil.newInstance( id, (instance!=null)?instance:_default, abdera);
+    Object obj =  ServiceUtil.newInstance( id, (instance!=null)?instance:_default, abdera);
+    if (logger.isDebugEnabled()) {
+      logger.debug("Returning " + obj + " as instance of '" + id + "'.");
+    }
+    return obj;
   }
   
   public synchronized ProviderManager getProviderManager() {



Mime
View raw message