You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <tu...@ws.apache.org> on 2008/06/10 19:00:45 UTC

[jira] Commented: (TUSCANY-2229) Got WARNING if @Context is used to annotate a setter method

    [ https://issues.apache.org/jira/browse/TUSCANY-2229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603932#action_12603932 ] 

Raymond Feng commented on TUSCANY-2229:
---------------------------------------

Hi,

This is a result of declaring the two context fields as public. Tuscany takes them as properties. If you change them into private, then no warning is issued. I'll try to see if I can remove them from property list.

Thanks,
Raymond

> Got WARNING if @Context is used to annotate a setter method
> -----------------------------------------------------------
>
>                 Key: TUSCANY-2229
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2229
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>            Reporter: Gilbert Kwan
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> I got following warnings when @Context is used to annotate a setter method:
> Apr 15, 2008 11:45:18 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1
> problem
> WARNING: No type specified on component property: BComponent/requestContext
> Apr 15, 2008 11:45:18 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1
> problem
> WARNING: No type specified on component property: BComponent/componentContext
> Apr 15, 2008 11:45:18 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1
> problem
> WARNING: No type specified on component property: BComponent/requestContext
> Apr 15, 2008 11:45:18 AM
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1
> problem
> WARNING: No type specified on component property: BComponent/componentContext
> Implementation Class:
> =================
> public RequestContext requestContext;
> public ComponentContext componentContext;
> @Context
> public void setComponentContext(ComponentContext componentContext) {
>        this.componentContext = componentContext;
> }
> @Context
> public void setRequestContext(RequestContext requestContext) {
>        this.requestContext = requestContext;
> }
> Composite:
> =========
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" 
>        targetNamespace="http://java-api-tests"
>        name="AB-Composite">
>    <component name="BComponent">
>        <implementation.java
> class="org.apache.tuscany.sca.vtest.javaapi.impl.BServiceImpl"/>
>    </component>
> </composite>
> If @Context is used to annotate a class field, there is no warning.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.