[jboss-cvs] jboss-seam/src/ioc/org/jboss/seam/ioc/spring ...
Norman Richards
norman.richards at jboss.com
Tue Feb 20 20:08:51 EST 2007
User: nrichards
Date: 07/02/20 20:08:51
Modified: src/ioc/org/jboss/seam/ioc/spring
SeamNamespaceHandler.java
SeamScopePostProcessor.java SpringComponent.java
spring.xsd
Log:
remove override
Revision Changes Path
1.5 +33 -35 jboss-seam/src/ioc/org/jboss/seam/ioc/spring/SeamNamespaceHandler.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SeamNamespaceHandler.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/ioc/org/jboss/seam/ioc/spring/SeamNamespaceHandler.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- SeamNamespaceHandler.java 18 Feb 2007 23:09:34 -0000 1.4
+++ SeamNamespaceHandler.java 21 Feb 2007 01:08:51 -0000 1.5
@@ -174,15 +174,13 @@
throw new IllegalStateException(
"The spring bean scope must be prototype to use a seam scope other than STATELESS.");
}
- // determine if we want to override any existing seam component definitions
- boolean override = Boolean.parseBoolean(node.getAttributes().getNamedItem("override").getNodeValue());
if (!(parserContext.getRegistry() instanceof BeanFactory))
{
throw new RuntimeException("For some reason your registry is not a BeanFactory");
}
SpringComponent.addSpringComponent(seamName, springName, beanClassName, scope, (BeanFactory) parserContext
- .getRegistry(), interceptionType, override);
+ .getRegistry(), interceptionType);
return definition;
}
}
1.4 +32 -44 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.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- SeamScopePostProcessor.java 18 Feb 2007 17:17:54 -0000 1.3
+++ SeamScopePostProcessor.java 21 Feb 2007 01:08:51 -0000 1.4
@@ -15,7 +15,7 @@
* Post processor that makes all of the seam scopes available in
* spring and takes all of the beans with those scopes and creates
* Seam Components out of them. <p/> To use simply define the
- * namespace hanlder in in your ApplicationContext.
+ * namespace handler in in your ApplicationContext.
* <seam:configure-scopes/>
*
* @author youngm
@@ -33,8 +33,6 @@
private String prefix;
- private boolean override = false;
-
/**
* Null is not a valid prefix so make it the default is used if null or empty.
*
@@ -112,8 +110,7 @@
}
continue;
}
- SpringComponent.addSpringComponent(beanName, beanName, definition.getBeanClassName(), scope, beanFactory, null,
- override);
+ SpringComponent.addSpringComponent(beanName, beanName, definition.getBeanClassName(), scope, beanFactory, null);
}
}
finally
@@ -126,19 +123,10 @@
}
/**
- * @param prefix casesensitive the prefix to use to identify seam scopes for spring beans. Default is "seam."
+ * @param prefix case sensitive the prefix to use to identify seam scopes for spring beans. Default is "seam."
*/
public void setPrefix(String prefix)
{
this.prefix = prefix;
}
-
- /**
- * @param override set to tell the postprocessor to duplicate any preexisting seam components that may have the same
- * name as the candidate spring bean. Default: false
- */
- public void setOverride(boolean override)
- {
- this.override = override;
- }
}
1.5 +43 -43 jboss-seam/src/ioc/org/jboss/seam/ioc/spring/SpringComponent.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SpringComponent.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/ioc/org/jboss/seam/ioc/spring/SpringComponent.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- SpringComponent.java 18 Feb 2007 23:09:34 -0000 1.4
+++ SpringComponent.java 21 Feb 2007 01:08:51 -0000 1.5
@@ -66,7 +66,7 @@
* @param override If a seam component already exists should we override it?
*/
public static void addSpringComponent(String componentName, String springBeanName, String beanClassName,
- ScopeType scopeType, BeanFactory beanFactory, InterceptionType interceptorType, boolean override)
+ ScopeType scopeType, BeanFactory beanFactory, InterceptionType interceptorType)
{
// mock the application context
// TODO reuse
@@ -78,7 +78,7 @@
}
try
{
- if (!override && Component.forName(componentName) != null)
+ if (Component.forName(componentName) != null)
{
throw new IllegalStateException("Cannot add spring component to seam with name: " + componentName
+ ". There is already a seam component with that name.");
1.2 +3 -21 jboss-seam/src/ioc/org/jboss/seam/ioc/spring/spring.xsd
(In the diff below, changes in quantity of whitespace are not shown.)
Index: spring.xsd
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/ioc/org/jboss/seam/ioc/spring/spring.xsd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- spring.xsd 17 Feb 2007 04:44:17 -0000 1.1
+++ spring.xsd 21 Feb 2007 01:08:51 -0000 1.2
@@ -26,15 +26,6 @@
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
- <xsd:attribute name="override" type="xsd:boolean" use="optional" default="false">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- If a duplicate is found should it override it or throw an error? Default: false
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="instance">
@@ -175,15 +166,6 @@
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
- <xsd:attribute name="override" type="xsd:boolean" use="optional" default="false">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- If a duplicate is found should it override it or throw an error? Default: false
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
<xsd:attribute name="scope" use="optional" default="STATELESS">
<xsd:annotation>
<xsd:documentation>
More information about the jboss-cvs-commits
mailing list