Author: gawor
Date: Thu Jul 16 15:02:29 2009
New Revision: 794705
URL: http://svn.apache.org/viewvc?rev=794705&view=rev
Log:
cannot have interfaces and auto-export to non-disabled
Modified:
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java?rev=794705&r1=794704&r2=794705&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/Parser.java
Thu Jul 16 15:02:29 2009
@@ -597,7 +597,10 @@
if (service.getAutoExport() == ServiceMetadata.AUTO_EXPORT_DISABLED && service.getInterfaces().isEmpty())
{
throw new ComponentDefinitionException(INTERFACE_ATTRIBUTE + " attribute or "
+ INTERFACES_ELEMENT + " element must be set when " + AUTO_EXPORT_ATTRIBUTE + " is set to
" + AUTO_EXPORT_DISABLED);
}
-
+ // Check for non-disabled auto-exports and interfaces
+ if (service.getAutoExport() != ServiceMetadata.AUTO_EXPORT_DISABLED && !service.getInterfaces().isEmpty())
{
+ throw new ComponentDefinitionException(INTERFACE_ATTRIBUTE + " attribute or
" + INTERFACES_ELEMENT + " element must not be set when " + AUTO_EXPORT_ATTRIBUTE + " is set
to anything else than " + AUTO_EXPORT_DISABLED);
+ }
ComponentMetadata s = service;
// Parse custom attributes
|