[seam-commits] Seam SVN: r9711 - trunk/src/main/org/jboss/seam/contexts.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Dec 3 22:42:06 EST 2008
Author: youngm
Date: 2008-12-03 22:42:05 -0500 (Wed, 03 Dec 2008)
New Revision: 9711
Modified:
trunk/src/main/org/jboss/seam/contexts/ServerConversationContext.java
Log:
JBSEAM-3655 backed out the cache
Modified: trunk/src/main/org/jboss/seam/contexts/ServerConversationContext.java
===================================================================
--- trunk/src/main/org/jboss/seam/contexts/ServerConversationContext.java 2008-12-04 03:14:42 UTC (rev 9710)
+++ trunk/src/main/org/jboss/seam/contexts/ServerConversationContext.java 2008-12-04 03:42:05 UTC (rev 9711)
@@ -36,7 +36,6 @@
private final Set<String> removals = new HashSet<String>();
private final String id;
private final List<String> idStack;
- private final Map<String, Object> cache = new HashMap<String, Object>();
private List<String> getIdStack()
{
@@ -82,24 +81,9 @@
this.idStack = new LinkedList<String>();
idStack.add(id);
}
-
- public Object get(String name)
- {
- if (!cache.containsKey(name))
- {
- Object value = resolveValue(name);
- //Don't cache the value of components that have @PerNestedConverstion
- if(isPerNestedConversation(name))
- {
- return value;
- }
- cache.put(name, value);
- }
- return cache.get(name);
- }
-
- protected Object resolveValue(String name)
- {
+
+ public Object get(String name)
+ {
Object result = additions.get(name);
if (result!=null)
{
@@ -164,7 +148,6 @@
public void set(String name, Object value)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
- cache.remove(name);
if (value==null)
{
//yes, we need this
@@ -202,7 +185,6 @@
public void remove(String name)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
- cache.remove(name);
additions.remove(name);
removals.add(name);
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
@@ -263,7 +245,6 @@
public void clear()
{
- cache.clear();
additions.clear();
removals.addAll( getNamesFromSession() );
}
More information about the seam-commits
mailing list