Tuscany
  1. Tuscany
  2. TUSCANY-3965

In a Service Implementation annotated with @Service, it's unannonated properties should not be introspected

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Java-SCA-2.0-Beta1
    • Fix Version/s: Java-SCA-2.x
    • Labels:
      None
    • Environment:
      All

      Description

      I was trying to deploy a composite which has component implementing a java implementation annotated with @Service which has the following field

      @Service(TestOasis.class)
      public class TestOasisImpl implements TestOasis {

      @DefaultHelperContext
      protected HelperContext helperContext;

      This is not a property as it clearly does not have a @Property annotation and hence the composite definition does not define this property. However, the validation is logging this as an error as follows

      [Composite:

      {http://docs.oasis-open.org/ns/opencsa/sca/200912}

      , Component: SDOSimpleServiceJavaSerOasis] - No type specified on component property: Component = SDOSimpleServiceJavaSerOasis Property = helperContext

      This is coming from org.apache.tuscany.sca.builder.impl.ComponentBuilderImpl and the message ID is NoTypeForComponentProperty

      This validation is too strict and we should ignore properties defined in Service class which are not annotated with @Property. The CI spec section 8.1 appears to confirm to this deduction.

        Activity

        Hasan Muhammad created issue -
        Simon Laws made changes -
        Field Original Value New Value
        Assignee Simon Laws [ simonslaws ]
        ant elder made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        ant elder made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Simon Laws [ simonslaws ]
        Simon Laws made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Hasan Muhammad
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development