[jboss-cvs] jboss-seam/src/ioc/org/jboss/seam/ioc/spring ...
Michael Youngstrom
youngm at gmail.com
Fri Nov 16 15:34:09 EST 2007
User: myoungstrom
Date: 07/11/16 15:34:09
Modified: src/ioc/org/jboss/seam/ioc/spring
SeamScopePostProcessor.java spring-seam-2.0.xsd
Log:
JBSEAM-2190
Revision Changes Path
1.5 +14 -0 jboss-seam/src/ioc/org/jboss/seam/ioc/spring/SeamScopePostProcessor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SeamScopePostProcessor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/ioc/org/jboss/seam/ioc/spring/SeamScopePostProcessor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- SeamScopePostProcessor.java 21 Feb 2007 01:08:51 -0000 1.4
+++ SeamScopePostProcessor.java 16 Nov 2007 20:34:09 -0000 1.5
@@ -3,6 +3,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.contexts.Lifecycle;
+import org.jboss.seam.core.Init;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.springframework.beans.BeansException;
@@ -33,6 +34,8 @@
private String prefix;
+ private boolean defaultAutoCreate = false;
+
/**
* Null is not a valid prefix so make it the default is used if null or empty.
*
@@ -111,6 +114,10 @@
continue;
}
SpringComponent.addSpringComponent(beanName, beanName, definition.getBeanClassName(), scope, beanFactory, null);
+ if (defaultAutoCreate)
+ {
+ Init.instance().addAutocreateVariable(beanName);
+ }
}
}
finally
@@ -129,4 +136,11 @@
{
this.prefix = prefix;
}
+
+ /**
+ * @param defaultAutoCreate whether or not context variables should be set to auto-create. Default is false.
+ */
+ public void setDefaultAutoCreate(boolean defaultAutoCreate) {
+ this.defaultAutoCreate = defaultAutoCreate;
+ }
}
1.3 +10 -0 jboss-seam/src/ioc/org/jboss/seam/ioc/spring/spring-seam-2.0.xsd
(In the diff below, changes in quantity of whitespace are not shown.)
Index: spring-seam-2.0.xsd
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/ioc/org/jboss/seam/ioc/spring/spring-seam-2.0.xsd,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- spring-seam-2.0.xsd 3 Jul 2007 20:36:29 -0000 1.2
+++ spring-seam-2.0.xsd 16 Nov 2007 20:34:09 -0000 1.3
@@ -26,6 +26,16 @@
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
+ <xsd:attribute name="default-auto-create" type="xsd:boolean" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Should instances of this component be auto-created. Defaults to false since custom Seam
+ scopes are typically used to create stateful components that go on to be created multiple times.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="instance">
More information about the jboss-cvs-commits
mailing list