SCA Service Component Architecture
Java Common Annotations and APIs
SCA Version 1.00. March 21 2007
Technical Contacts:
Ron Barack SAP AG
Michael Beisiegel IBM Corporation
Henning Blohm SAP AG
Dave Booz IBM Corporation
Jeremy Boynes Independent
Ching-Yun Chao IBM Corporation
Adrian Colyer Interface21
Mike Edwards IBM Corporation
Hal Hildebrand Oracle
Sabin Ielceanu TIBCO Software, Inc
Anish Karmarkar Oracle
Daniel Kulp IONA Technologies plc.
Ashok Malhotra Oracle
Jim Marino BEA Systems, Inc.
Michael Rowley BEA Systems, Inc.
Ken Tam BEA Systems, Inc
Scott Vorthmann TIBCO Software, Inc
Lance Waterman Sybase, Inc.
SCA Service Component Architecture SCA
服务构件架构
——
2008.9
3 / 58
SCA Java Common Annotations and APIs Specification 1.00 ,Java 通用注解和 API 规范 v1.00
Copyright Notice
© Copyright BEA Systems, Inc., Cape Clear Software, International Business Machines Corp, Interface21, IONA
Technologies,Oracle, Primeton Technologies, Progress Software, Red Hat, Rogue Wave Software, SAP AG., Siemens AG., Software
AG., Sybase Inc., TIBCO Software Inc., 2005, 2007. All rights reserved.
License
The Service Component Architecture Specification is being provided by the copyright holders under the f
ollowing license. By using and/or copying this work, you agree that you have read, understood and will
comply with the following terms and conditions:
Permission to copy and display the Service Component Architecture Specification and/or portions thereof,
without modification, in any medium without fee or royalty is hereby granted, provided that you include
the following on ALL copies of the Service Component Architecture Specification, or portions thereof,
that you make:
1. A link or URL to the Service Component Architecture Specification at this location:
• http://www.osoa.org/display/Main/Service+Component+Architecture+Specifications
2. The full text of this copyright notice as shown in the Service Component Architecture Specification.
BEA, Cape Clear, IBM, Interface21, IONA, Oracle, Primeton, Progress Software, Red Hat, Rogue
Wave, SAP, Siemens, Software AG., Sun, Sybase, TIBCO (collectively, the “Authors”) agree to grant you a
royalty-free license, under reasonable, non-discriminatory terms and conditions to patents that they deem
necessary to implement the Service Component Architecture Specification.
THE Service Component Architecture SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SPECIFICATION AND THE
IMPLEMENTATION OF ITS CONTENTS, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR TITLE.
THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE
Service Components Architecture SPECIFICATION.
The name and trademarks of the Authors may NOT be used in any manner, including advertising or
publicity pertaining to the Service Component Architecture Specification or its contents without specific,
written prior permission. Title to copyright in the Service Component Architecture Specification will at all
times remain with the Authors.
No other rights are granted by implication, estoppel or otherwise.
SCA Service Component Architecture SCA
服务构件架构
——
2008.9
4 / 58
SCA Java Common Annotations and APIs Specification 1.00 ,Java 通用注解和 API 规范 v1.00
Status of this Document
This specification may change before final release and you are cautioned against relying on the content of
this specification. The authors are currently soliciting your contributions and suggestions. Licenses are available
for the purposes of feedback and (optionally) for implementation.
IBM is a registered trademark of International Business Machines Corporation in the United States,
other countries, or both.
BEA is a registered trademark of BEA Systems, Inc.
Cape Clear is a registered trademark of Cape Clear Software
IONA and IONA Technologies are registered trademarks of IONA Technologies plc.
Oracle is a registered trademark of Oracle USA, Inc.
Progress is a registered trademark of Progress Software Corporation
Primeton is a registered trademark of Primeton Technologies, Ltd.
Red Hat is a registered trademark of Red Hat Inc.
Rogue Wave is a registered trademark of Quovadx, Inc
SAP is a registered trademark of SAP AG.
SIEMENS is a registered trademark of SIEMENS AG
Software AG is a registered trademark of Software AG
Sun and Sun Microsystems are registered trademarks of Sun Microsystems, Inc.
Sybase is a registered trademark of Sybase, Inc.
TIBCO is a registered trademark of TIBCO Software Inc.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other
countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
SCA Service Component Architecture SCA
服务构件架构
——
2008.9
5 / 58
SCA Java Common Annotations and APIs Specification 1.00 ,Java 通用注解和 API 规范 v1.00
目录
Copyright Notice ............................................................................................................................................................ 3
License ............................................................................................................................................................................ 3
目录 ................................................................................................................................................................................... 5
1. 通用注解、API、客户程序和实现模型 ................................................................................................................. 7
1.1. 简介 ........................................................................................................................................................................... 7
1.2. 实现的元数据 ........................................................................................................................................................... 7
1.2.1. 服务元数据 ............................................................................................................................................................ 8
1.2.2.@Reference ........................................................................................................................................................... 8
1.2.3. @Property ............................................................................................................................................................. 9
1.2.4. 实现作用域:@Scope、@Init、@Destroy ....................................................................................................... 9
1.3 接口元数据 .............................................................................................................................................................. 10
1.3.1. @Remotable ....................................................................................................................................................... 10
1.3.2. @Conversational ................................................................................................................................................ 11
1.4. 客户 API .................................................................................................................................................................. 11
1.4.1. SCA 构件访问服务 .............................................................................................................................................. 11
1.4.2. 非 SCA 构件的实现访问服务 ............................................................................................................................ 11
1.5. 错误处理 ................................................................................................................................................................. 12
1.6. 异步与会话编程 ..................................................................................................................................................... 12
1.6.1. @OneWay ........................................................................................................................................................... 12
1.6.2. 会话型服务 .......................................................................................................................................................... 13
1.6.3. 将会话型服务作为参数传递 .............................................................................................................................. 13
1.6.4. 会话型客户程序 .................................................................................................................................................. 14
1.6.5. 会话生命周期总结 .............................................................................................................................................. 15
1.6.6. Conversations ID ................................................................................................................................................ 15
1.6.7. 回调 .................................................................................................................................................................... 16
1.6.8. 会话与回调的绑定 ............................................................................................................................................ 21
1.7. Java API .................................................................................................................................................................... 21
1.7.1. Component Context ............................................................................................................................................ 21
1.7.2. Request Context .................................................................................................................................................. 23
1.7.3. CallableReference ............................................................................................................................................... 24
1.7.4. ServiceReference ................................................................................................................................................ 25
1.7.5 Conversation 会话 .................................................................................................................................................. 26
1.7.6. NoRegisteredCallbackException 异常 ....................................................................................................... 26
1.7.7. Service Runtime Exception ................................................................................................................................ 26
1.7.8. Service Unavailable Exception ........................................................................................................................... 27
1.7.9. Conversation Ended Exception........................................................................................................................... 27
1.8 Java 注解 ................................................................................................................................................................... 27
1.8.1. @AllowsPassByReference ................................................................................................................................. 27
1.8.2. @Callback .......................................................................................................................................................... 28
1.8.3. @ComponentName ............................................................................................................................................ 30
1.8.4. @Conversation ................................................................................................................................................... 30
- 1
- 2
前往页