You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Dan Becker (JIRA)" <de...@tuscany.apache.org> on 2009/03/10 16:32:53 UTC
[jira] Commented: (TUSCANY-2901) It should throw a runtime
exception when component property name is not matched
[ https://issues.apache.org/jira/browse/TUSCANY-2901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680510#action_12680510 ]
Dan Becker commented on TUSCANY-2901:
-------------------------------------
I can see no requirement in the OSOA or OASIS assembly specification that requires a failure or exception if a property does not exist in an implementation. In my view, a warning is appropriate since the value is not being used, and the builder is letting you know about this. Since the user is being notified, I think the current behavior is adequate and acceptable.
> It should throw a runtime exception when component property name is not matched
> -------------------------------------------------------------------------------
>
> Key: TUSCANY-2901
> URL: https://issues.apache.org/jira/browse/TUSCANY-2901
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Assembly Model
> Affects Versions: Java-SCA-1.3.1
> Reporter: Ku Jun Guo
>
> If the property name in composite file is not matched with the implementation, it should throw a ServiceRuntimeException, but in my test, it just
> gave some warning messages.
> Mar 4, 2009 9:54:57 AM org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl
> WARNING: Property not found for component property: Component = TestComponent1 Property = randomName
> Mar 4, 2009 9:54:57 AM org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl
> WARNING: Property not found for component property: Component = TestComponent1 Property = randomName
> My composite file:
> <component name="TestComponent1">
> <implementation.composite name="tns:TestComposite1"/>
> <service name="Service1">
> <interface.java interface="test.Service1"/>
> </service>
>
> <!--
> <property name="serviceName">service1</property>
> -->
>
> <!-- Property with @name attribute that does not match the @name
> attribute of any of the <property/> elements in the
> <componentType/> of the <implementation/> -->
> <property name="randomName">randomValue</property>
> </component>
> Service Impl class :
> @Service(Service1.class)
> public class service1Impl implements Service1 {
>
> @Property
> public String serviceName = "service1";
> public String operation1(String input) {
> return serviceName + " operation1 invoked";
> }
> }
> Anyone has comments on this? Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.