Author: nickarls
Date: 2008-12-19 02:52:10 -0500 (Fri, 19 Dec 2008)
New Revision: 568
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/AbstractBeanMapAdaptor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanMap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/SessionBeanMap.java
Log:
Put traces back in
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/AbstractBeanMapAdaptor.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/AbstractBeanMapAdaptor.java 2008-12-19
07:39:32 UTC (rev 567)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/AbstractBeanMapAdaptor.java 2008-12-19
07:52:10 UTC (rev 568)
@@ -24,9 +24,15 @@
import javax.webbeans.manager.Contextual;
import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.servlet.ApplicationBeanMap;
public abstract class AbstractBeanMapAdaptor implements BeanMap
{
+ // The log provider
+ private static LogProvider log = Logging.getLogProvider(ApplicationBeanMap.class);
+
/**
* Gets a bean from the map
*
@@ -38,6 +44,7 @@
{
String key = getBeanKey(bean);
T instance = (T) getAttribute(key);
+ log.trace("Looked for " + key + " and got " + instance);
return instance;
}
@@ -52,6 +59,7 @@
T instance = get(bean);
String key = getBeanKey(bean);
removeAttribute(key);
+ log.trace("Removed bean under key " + key);
return instance;
}
@@ -66,7 +74,9 @@
{
String name = (String) names.nextElement();
removeAttribute(name);
+ log.trace("Cleared " + name);
}
+ log.trace("Bean Map cleared");
}
/**
@@ -103,6 +113,7 @@
{
String key = getBeanKey(bean);
setAttribute(key, instance);
+ log.trace("Added bean " + bean + " under key " + key);
}
/**
@@ -127,6 +138,12 @@
*/
protected abstract Enumeration<String> getAttributeNames();
+ /**
+ * Sets an instance under a key in the underlying storage
+ *
+ * @param key The key
+ * @param instance The instance
+ */
protected abstract void setAttribute(String key, Object instance);
/**
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanMap.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanMap.java 2008-12-19
07:39:32 UTC (rev 567)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ApplicationBeanMap.java 2008-12-19
07:52:10 UTC (rev 568)
@@ -23,8 +23,6 @@
import org.jboss.webbeans.contexts.AbstractBeanMapAdaptor;
import org.jboss.webbeans.contexts.ApplicationContext;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
/**
* A BeanMap that uses a servlet context as backing map
@@ -35,8 +33,6 @@
*/
public class ApplicationBeanMap extends AbstractBeanMapAdaptor
{
- // The log provider
- private static LogProvider log = Logging.getLogProvider(ApplicationBeanMap.class);
// The servlet context to use as backing map
private ServletContext context;
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/SessionBeanMap.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/SessionBeanMap.java 2008-12-19
07:39:32 UTC (rev 567)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/SessionBeanMap.java 2008-12-19
07:52:10 UTC (rev 568)
@@ -23,8 +23,6 @@
import org.jboss.webbeans.contexts.AbstractBeanMapAdaptor;
import org.jboss.webbeans.contexts.ApplicationContext;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
/**
* A BeanMap that uses a HTTP session as backing map
@@ -35,8 +33,6 @@
*/
public class SessionBeanMap extends AbstractBeanMapAdaptor
{
- // The log provider
- private static LogProvider log = Logging.getLogProvider(ApplicationBeanMap.class);
// The HTTP session context to use as backing map
private HttpSession session;