[seam-commits] Seam SVN: r15093 - branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Aug 29 07:21:47 EDT 2012
Author: vdedik
Date: 2012-08-29 07:21:47 -0400 (Wed, 29 Aug 2012)
New Revision: 15093
Modified:
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Namespace.java
Log:
JBSEAM-4863
Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java 2012-08-28 19:27:36 UTC (rev 15092)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java 2012-08-29 11:21:47 UTC (rev 15093)
@@ -2361,8 +2361,9 @@
{
log.debug("trying to inject with hierarchical context search: " + name);
}
- boolean create = in.create() && !org.jboss.seam.contexts.Lifecycle.isDestroying();
- result = getInstanceInAllNamespaces(name, create);
+ boolean allowAutocreation = !org.jboss.seam.contexts.Lifecycle.isDestroying();
+ boolean create = in.create() && allowAutocreation;
+ result = getInstanceInAllNamespaces(name, create, allowAutocreation);
}
else
{
@@ -2407,15 +2408,15 @@
}
}
- private Object getInstanceInAllNamespaces(String name, boolean create)
+ private Object getInstanceInAllNamespaces(String name, boolean create, boolean allowAutocreation)
{
Object result;
- result = getInstance(name, create);
+ result = getInstance(name, create, allowAutocreation);
if (result==null)
{
for ( Namespace namespace: getImports() )
{
- result = namespace.getComponentInstance(name, create);
+ result = namespace.getComponentInstance(name, create, allowAutocreation);
if (result!=null) break;
}
}
@@ -2423,7 +2424,7 @@
{
for ( Namespace namespace: Init.instance().getGlobalImports() )
{
- result = namespace.getComponentInstance(name, create);
+ result = namespace.getComponentInstance(name, create, allowAutocreation);
if (result!=null) break;
}
}
@@ -2432,7 +2433,7 @@
Namespace namespace = getNamespace();
if (namespace!=null)
{
- result = namespace.getComponentInstance(name, create);
+ result = namespace.getComponentInstance(name, create, allowAutocreation);
}
}
return result;
Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Namespace.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Namespace.java 2012-08-28 19:27:36 UTC (rev 15092)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Namespace.java 2012-08-29 11:21:47 UTC (rev 15093)
@@ -55,6 +55,11 @@
return Component.getInstance( qualifyName(key), create );
}
+ public Object getComponentInstance(String key, boolean create, boolean allowAutocreation)
+ {
+ return Component.getInstance( qualifyName(key), create, allowAutocreation );
+ }
+
private String qualifyName(String key)
{
return name==null ? key : name + key;
More information about the seam-commits
mailing list