sca-j message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: [sca-j] [NEW ISSUE] A hole in the algorithm of introspecting property/referencefrom an unannotated impl class
- From: Raymond Feng <rfeng@us.ibm.com>
- To: sca-j@lists.oasis-open.org
- Date: Fri, 19 Oct 2007 12:39:12 -0500
TARGET: Java Component Implementation Specification
DESCRIPTION :
The spec says:
358 1.2.7. Semantics of an Unannotated Implementation
359 The section defines the rules for determining properties
and references for a Java component
360 implementation that does not explicitly declare them
using @Reference or @Property.
361 In the absence of @Property and @Reference annotations,
the properties and references of a class are
362 defined according to the following rules:
363 1. Public setter methods that are not
included in any interface specified by an @Service annotation.
364 2. Protected setter methods
365 3. Public or protected fields unless there is a public
or protected setter method for the same name
To apply the rule to the following case:
public class MyServiceImpl implements MyService
{
public
void setX(String x) {
...
}
}
@Remotable
public interface MyService {
void setX(String
x);
}
"x" will be taken as a property as it's NOT
in any interface specified by @Service which is not present at all. But
"setX()" is also an operation for the service "MyService
".
It's also tricky for the following case:
public class MyServiceImpl {
public
void setX(String x) {
...
}
}
The service type will be MyServiceImpl.class. Would "x"
be treated as a property or "setX()" as a business operation?
Another question would be: Is it valid to have a
setter method denote both a property/reference and business operation?
PROPOSAL:
Change the text to:
363 1. Public setter methods that are not included in
any interfaces from services introspected
from this implementation class
Thanks,
Raymond
Raymond Feng
Senior Software Engineer, Open Source SCA Development, Apache Tuscany Project
IBM Burlingame Lab, 577 Airport Blvd., Suite 800, Burlingame,
CA 94010, USA
E-mail: rfeng@us.ibm.com,
Notes: Raymond Feng/Burlingame/IBM, Tel: 650-558-3388,
T/L: 222-3388
Web & Blog: www.enjoyjava.com
- The Cyber Cafeteria to Enjoy
Java
S/MIME Cryptographic Signature
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]