Chapter 5. Implementing components using the Java language

 

This chapter covers

  • SCA Java annotations
  • Java interfaces for services and references
  • Services, references, and properties in Java implementations
  • Component scope
  • Callbacks and conversations
  • Passing SCA service references
  • Error handling

Each component in a Tuscany SCA composite application is implemented using an implementation type. The SCA specifications define a number of implementation types, for example:

  • implementation.java
  • implementation.spring
  • implementation.bpel

The Tuscany project has also added a few more, for example, implementation.script.

In this chapter we’ll focus on implementation.java. The other implementation types mentioned will be discussed in chapter 6.

The SCA Java Component Implementation specification defines implementation.java (http://www.osoa.org/download/attachments/35/SCA_JavaComponentImplementation_V100.pdf). This implementation type allows application developers to use new or existing Java classes and interfaces to implement SCA components. These components can then be wired with other components, either locally or remotely, to form a composite application.

5.1. Defining a Java component implementation

5.2. Using SCA annotations in Java implementations

5.3. Services and references with Java interfaces

5.4. Java component services

5.5. Java component references

5.6. Java component properties

5.7. Java component instance creation and scope

5.8. Making callbacks

5.9. Holding conversations

5.10. Passing SCA service references

5.11. Handling errors

5.12. Summary