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: Re: [sca-j] ISSUE 4 - Proposed spec text for dependency reinjection


There's a few places where the wording is incorrect, and few where it is
confusing.

1) We should differentiate between service undeployed =>
InvalidServiceException, and service unavailable =>
ServiceUnavailableException.  There are two places in the text that need to
be changed.

2) The @Init annotation says that the annotated method is called AFTER
props and refs have been injected.  We need to reconcile this with
re-injection as it is possible that re-injection could occur immediately
after initial injection but before the @init method potentially resulting
in the @init method and setters (due to re-injection) running concurrently.
What guarantees or restrictions do we want to give here?  I suspect the
same issue exists for @eagerinit but there's no text in that section (8.9).

3) In the following paragraph (and the one like it further down):

If an operation is called on a reference where the target of that
reference has been undeployed or has become unavailable, the SCA runtime
SHOULD throw InvalidServiceException.  It the target of the reference is
changed, the reference MAY continue to work, depending on the runtime and
the type of change that was made.  If it doesn't work, the exception
thrown will depend on the runtime and the cause of the failure.

The second sentence confuses me.  Why did we switch from talking about
undeployed services to changed targets?  Seems like a repeat of the
previous paragraph....or I missed the point.




Dave Booz
STSM, SCA and WebSphere Architecture
Co-Chair OASIS SCA-Policy TC
"Distributed objects first, then world hunger"
Poughkeepsie, NY (845)-435-6093  or  8-295-6093
e-mail:booz@us.ibm.com
http://washome.austin.ibm.com/xwiki/bin/view/SCA2Team/WebHome


                                                                           
             Simon Nash                                                    
             <NASH@uk.ibm.com>                                             
                                                                        To 
             01/31/2008 10:24          "OASIS Java"                        
             AM                        <sca-j@lists.oasis-open.org>        
                                                                        cc 
                                                                           
                                                                   Subject 
                                       [sca-j] ISSUE 4 - Proposed spec     
                                       text  for dependency reinjection    
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Here's my attempt to merge the contents of the v5 spreadsheet with
Michael's original text.  There's bit more work still to do to capture the
decisions we made regarding callback injection and reinjection.

- - - - begin spec words - - - -

References MAY be reinjected after the initial creation of a component if
the reference target changes due to a change in wiring that has occurred
since the component was initialized.  In order for reinjection to occur,
the following MUST be true:
1) The component MUST NOT be STATELESS or REQUEST scoped.
2) The reference MUST use either field-based injection or setter
injection. References that are injected through constructor injection MUST
NOT be changed.  Setter injection allows for code in the setter method to
perform processing in reaction to a change.
3) If the reference has a conversational interface, then reinjection MUST
NOT occur while the conversation is active.

If a reference target changes and the reference is not reinjected, it MUST
continue to work as if the reference target was not changed.

If an operation is called on a reference where the target of that
reference has been undeployed or has become unavailable, the SCA runtime
SHOULD throw InvalidServiceException.  It the target of the reference is
changed, the reference MAY continue to work, depending on the runtime and
the type of change that was made.  If it doesn't work, the exception
thrown will depend on the runtime and the cause of the failure.

A ServiceReference that has been obtained from a reference by
ComponentContext.cast() corresponds to the reference that is passed as a
parameter to cast().  If the reference is subsequently reinjected, the
ServiceReference MUST continue to work as if the reference target was not
changed.  If the target of a ServiceReference has been undeployed or has
become unavailable, the SCA runtime SHOULD throw InvalidServiceException.
If the target of a ServiceReference is changed, the reference MAY continue
to work, depending on the runtime and the type of change that was made. If
it doesn't work, the exception thrown will depend on the runtime and the
cause of the failure.

A reference or ServiceReference accessed through the component context by
calling getService() or getServiceReference() MUST correspond to the
current configuration of the domain.  If the target has been undeployed or
has become unavailable, the result SHOULD be a reference to the undeployed
or unavailable service, and attempts to call business methods SHOULD throw
InvalidServiceException.  If the target has changed, the result SHOULD be
a reference to the changed service.

The rules for reference reinjection also apply to references with a
multiplicity of 0..N or 1..N.  This means that in the cases listed above
where reference reinjection is not allowed, the array or Collection for
the reference MUST NOT change their contents.  In cases where the contents
of a reference collection MAY change, then for references that use setter
injection, the setter method MUST be called for any change to the
contents.  The injected collection MAY be the same collection object as is
currently used by the component, but with some change to its contents.

- - - - end spec words - - - -

    Simon

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







---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail.  You may a link to this group and all your TCs in
OASIS
at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php





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