OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-j message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Incorrect code in section 6.7.4 examples


TARGET: Java Common Annotations and APIs, WD 04, section 6.7.4

DESCRIPTION: Incorrect code in section 6.7.4 examples

1. On line 556, the getCallback() call should say getService().
    This is correct in line 548.

2. On line 567, the code shows the invocation of a static method
      ComponentContext.getRequestContext()
    This method isn't static and requires a ComponentContext instance
    that was set by injection.

PROPOSAL:

1. Replace line 556 by:

    MyCallback myCallback = callback.getService();

2. Replace lines 564 through 567 by:

    @Context ComponentContext context;

    public void someMethod() {

        MyCallback myCallback =
            context.getRequestContext().getCallback();




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]