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: [sca-j] NEW ISSUE: When is a RequestContext available?


RAISER: Simon Nash
 
TARGET: SCA Java Annotations and APIs Section 7.1: ComponentContext
 
DESCRIPTION:

The decription of ComponentContext.getRequestContext() says in lines 
647-648 that it returns null if "... there is no current request or if the 
context is unavailable".  The situations where this applies need to be 
defined more precisely.  Here are some cases where a request context may 
or not be available:
1. Within a business method for a service of the component.
2. Within a property or reference injection setter method for an instance 
of the component.
3. Within a constructor for an instance of the component.
4. Within an Init or Destroy method for an instance of the component. 

In case 1, it seems clear that getRequestContext() will always return 
non-null.  In the other cases, it is not clear what should be returned.

PROPOSAL:

getRequestContext() MUST return non-null for case 1 and SHOULD return null 
for cases 2 through 4.


Simon C. Nash, IBM Distinguished Engineer
Member of the IBM Academy of Technology
Tel. +44-1962-815156  Fax +44-1962-818999





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU








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