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] NEW ISSUE: Runtime behaviour not specified for incorrect @Init/@Destroy signature


Hi Simon,

 

A quick question on usability from the user’s point of view for this change.

 

If, as a user, I use @Init on a method that does not quite match the spec – e.g. returns a value rather than of type void – the runtime silently ignoring this issue will make it harder for me as the user to identify what went wrong.

 

Perhaps the error should not be silently ignored?

 

 

There are a couple of options on how to help the user diagnose these problems. These include:

 

  • Make the runtime log the error at deployment time so the user can at least see the error in the logs – should the specification dictate this?
  • Fail deployment – I feel this will not be a popular option
  • Say that it is not a runtime issue. It is the responsibility of the user or of the tools that they use to ensure that they don’t do this.
  • Not worry about the ease of use for the end user in the Specification. It would be the responsibility of the SCA Runtime implementation to assist the user.

 

Any thoughts?

 

Thanks,

 

Mark

Mark Combellack| Software Developer| Avaya | Eastern Business Park | St. Mellons | Cardiff | CF3 5EA | Voice: +44 (0) 29 2081 7624 | mcombellack@avaya.com


From: Simon Nash [mailto:NASH@uk.ibm.com]
Sent: 08 May 2008 14:59
To: sca-j@lists.oasis-open.org
Subject: [sca-j] NEW ISSUE: Runtime behaviour not specified for incorrect @Init/@Destroy signature

 


RAISER: Simon Nash
 
TARGET: SCA Java Common Annotations and APIs
 
DESCRIPTION:

The Java Common Annotations and APIs spec says that @Init and @Destroy methods must be public, with a void return type and no arguments.  It does not specify the runtime behaviour if this rule is violated.  The specification should say whether or not the SCA runtime will invoke methods annotated with @Init and @Destroy that don't conform to the specification rules.

PROPOSAL:

The SCA runtime MUST invoke these methods if they conform to the stated rules, and MUST NOT invoke these methods if they don't conform to these rules.

Replace the following paragraph in section 8.10 of the 2/28 JavaCAA spec draft:
 
1116 The @Init annotation type is used to annotate a Java class method that is called when the scope
1117 defined for the local service implemented by the class starts. The method must have a void return
1118 value and no arguments. The annotated method must be public. The annotated method is called
1119 after all property and reference injection is complete.

by the following text:

The @Init annotation is used to denote a Java class method that is called when the scope defined for the
local service implemented by the class starts. The method MUST have a void return value and no arguments.
The annotated method MUST be public.

If there is a method that matches these criteria, the SCA runtime MUST call the annotated method after all
property and reference injection is complete.  A method annotated with @Init that does not match these
criteria MUST NOT be called by the SCA runtime.

Replace the following paragraph in section 8.7 of the 2/28 JavaCAA spec draft:

1054 The @Destroy annotation type is used to annotate a Java class method that will be called when
1055 the scope defined for the local service implemented by the class ends. The method must have a
1056 void return value and no arguments. The annotated method must be public.

by the following text:

The @Destroy annotation is used to denote a Java class method that is called when the scope defined for the
local service implemented by the class ends. The method MUST have a void return value and no arguments.
The annotated method MUST be public.

If there is a method that matches these criteria, the SCA runtime MUST call the annotated method.  A method
annotated with @Destroy that does not match these criteria MUST NOT be called by the SCA runtime.


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]