sca-j message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Introspecting services offered by a Java implementation class without @Service
- From: Raymond Feng <rfeng@us.ibm.com>
- To: sca-j@lists.oasis-open.org
- Date: Mon, 25 Aug 2008 11:25:46 -0500
Hi,
In Java Component Implementation Specification
1.00, we have the following statements:
143 1.2.1.3. Introspecting services
offered by a Java implementation
144 In the cases described below, the
services offered by a Java implementation class may be determined
145 through introspection, eliding the
need to specify them using @Service. The following algorithm is used to
146 determine how services are introspected
from an implementation class:
147 If the interfaces of the SCA services
are not specified with the @Service annotation on the implementation
148 class, it is assumed that all implemented
interfaces that have been annotated as @Remotable are the
149 service interfaces provided by the
component. If none of the implemented interfaces is remotable, then by
150 default the implementation offers
a single service whose type is the implementation class.
What if an interface is annotated with
SCA annotations such as @OneWay or @Callback?
For example:
public class MyServiceImpl implements
Interface1, Interface2 {
}
@Callback(CallbackInterface.class)
public interface Interface1 {
}
@OneWay
public interface Interface2 {
}
By the spec, there is only one service
named MyServiceImpl. But isn't it more natural that we should find two
SCA services: Interface1 and Interface2? Please clarify.
Thanks,
Raymond
Raymond Feng
Senior Software Engineer, Open Source SCA Development, Apache Tuscany Project
IBM Bay Area Lab, 1001 E Hillsdale Blvd, Suite 400,
Foster City, CA 94404, USA
E-mail: rfeng@us.ibm.com,
Notes: Raymond Feng/Burlingame/IBM, Tel: 650-645-8117,
T/L: 367-8117
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]