You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Gilbert Kwan <gi...@gmail.com> on 2008/04/15 18:08:40 UTC

Got WARNING if @Context is used to annotate a setter method

I am curious why 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

public RequestContext requestContext;
public ComponentContext componentContext;

@Context
public void setComponentContext(ComponentContext componentContext) {
	this.componentContext = componentContext;
}

@Context
public void setRequestContext(RequestContext requestContext) {
	this.requestContext = requestContext;
}

If @Context is used to annotate a class field, there is no warning.

Regards
Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Got WARNING if @Context is used to annotate a setter method

Posted by Raymond Feng <en...@gmail.com>.
Please open a JIRA and attach your test case then. We'll investigate.

Thanks,
Raymond
--------------------------------------------------
From: "Gilbert Kwan" <gi...@gmail.com>
Sent: Tuesday, April 15, 2008 10:27 AM
To: <tu...@ws.apache.org>
Subject: Re: Got WARNING if @Context is used to annotate a setter method

> my composite just simply as:
>
> <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>
>
>
>
> On Tue, Apr 15, 2008 at 1:08 PM, Raymond Feng <en...@gmail.com> wrote:
>> I need to see your composite file. It seems that you're trying to 
>> configure
>> the context as a property. Any setter method annotated with @Context will 
>> be
>> excluded from the SCA Reference/Property introspection against the Java 
>> impl
>> class.
>>
>> Thanks,
>> Raymond
>> --------------------------------------------------
>> From: "Gilbert Kwan" <gi...@gmail.com>
>> Sent: Tuesday, April 15, 2008 9:08 AM
>> To: <tu...@ws.apache.org>
>> Subject: Got WARNING if @Context is used to annotate a setter method
>>
>> >
>> >
>> >
>> > I am curious why 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
>> >
>> > public RequestContext requestContext;
>> > public ComponentContext componentContext;
>> >
>> > @Context
>> > public void setComponentContext(ComponentContext componentContext) {
>> > this.componentContext = componentContext;
>> > }
>> >
>> > @Context
>> > public void setRequestContext(RequestContext requestContext) {
>> > this.requestContext = requestContext;
>> > }
>> >
>> > If @Context is used to annotate a class field, there is no warning.
>> >
>> > Regards
>> > Gilbert
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Got WARNING if @Context is used to annotate a setter method

Posted by Gilbert Kwan <gi...@gmail.com>.
my composite just simply as:

<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>



On Tue, Apr 15, 2008 at 1:08 PM, Raymond Feng <en...@gmail.com> wrote:
> I need to see your composite file. It seems that you're trying to configure
> the context as a property. Any setter method annotated with @Context will be
> excluded from the SCA Reference/Property introspection against the Java impl
> class.
>
> Thanks,
> Raymond
> --------------------------------------------------
> From: "Gilbert Kwan" <gi...@gmail.com>
> Sent: Tuesday, April 15, 2008 9:08 AM
> To: <tu...@ws.apache.org>
> Subject: Got WARNING if @Context is used to annotate a setter method
>
> >
> >
> >
> > I am curious why 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
> >
> > public RequestContext requestContext;
> > public ComponentContext componentContext;
> >
> > @Context
> > public void setComponentContext(ComponentContext componentContext) {
> > this.componentContext = componentContext;
> > }
> >
> > @Context
> > public void setRequestContext(RequestContext requestContext) {
> > this.requestContext = requestContext;
> > }
> >
> > If @Context is used to annotate a class field, there is no warning.
> >
> > Regards
> > Gilbert
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Got WARNING if @Context is used to annotate a setter method

Posted by Raymond Feng <en...@gmail.com>.
I need to see your composite file. It seems that you're trying to configure 
the context as a property. Any setter method annotated with @Context will be 
excluded from the SCA Reference/Property introspection against the Java impl 
class.

Thanks,
Raymond
--------------------------------------------------
From: "Gilbert Kwan" <gi...@gmail.com>
Sent: Tuesday, April 15, 2008 9:08 AM
To: <tu...@ws.apache.org>
Subject: Got WARNING if @Context is used to annotate a setter method

> I am curious why 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
>
> public RequestContext requestContext;
> public ComponentContext componentContext;
>
> @Context
> public void setComponentContext(ComponentContext componentContext) {
> this.componentContext = componentContext;
> }
>
> @Context
> public void setRequestContext(RequestContext requestContext) {
> this.requestContext = requestContext;
> }
>
> If @Context is used to annotate a class field, there is no warning.
>
> Regards
> Gilbert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org