List of Listings

Chapter 1. Introducing Tuscany and SCA

Listing 1.1. The Trips interface definition

Listing 1.2. The implementation class for the TripProvider component

Listing 1.3. The trips.composite file

Listing 1.4. Load the GoodValueTrips contribution and test the TripProvider component

Listing 1.5. The jump-start launcher’s Trips interface definition

Listing 1.6. The tours.composite file

Listing 1.7. The Bookings interface definition

Listing 1.8. The Checkout interface definition

Listing 1.9. The Updates interface definition

Listing 1.10. The implementation class for the TripBooking component

Listing 1.11. The implementation class for the ShoppingCart component

Listing 1.12. The TestClient component implementation

Listing 1.13. Load and test trips.composite and tours.composite

Chapter 2. Using SCA components

Listing 2.1. A Java component implementation class with no SCA annotations

Listing 2.2. Reference injection using fields, setter methods, and constructor parameters

Listing 2.3. Connecting component references and services using wires

Listing 2.4. Using autowire to connect references and services

Listing 2.5. Wiring references with different multiplicities

Listing 2.6. Wiring references with different multiplicities using <wire> elements

Listing 2.7. Wiring references with different multiplicities using autowire

Listing 2.8. Defining properties for a component implementation

Listing 2.9. Configuring property values in component definitions

Listing 2.10. XML schema global element definition for SCA property

Listing 2.11. SCA configuration for property defined as global element

Listing 2.12. XML schema type definition for SCA property

Listing 2.13. SCA configuration for properties defined using a schema type

Listing 2.14. Configuring component services and references with bindings

Listing 2.15. Component definitions for the TuscanySCATours domain

Listing 2.16. Component definitions for the TuscanySCAHotels domain

Chapter 3. SCA composite applications

Listing 3.1. The sca-contribution.xml file from the introducing-tours contribution

Listing 3.2. The sca-contribution.xml file from the introducing-client contribution

Listing 3.3. Launcher code to load an application’s contributions and call a test method

Listing 3.4. Deployed composites containing component definitions

Listing 3.5. A simple launcher that creates a test client node and runs some test code

Listing 3.6. Creating a composite for use as a component implementation

Listing 3.7. Using a composite as a component implementation

Listing 3.8. Including a composite in another composite

Listing 3.9. Result of including a composite

Listing 3.10. Reusing a composite implementation in different components

Chapter 4. Service interaction patterns

Listing 4.1. Configuring conversational interaction

Listing 4.2. The CartStore component implementation with CONVERSATION scope

Chapter 5. Implementing components using the Java language

Listing 5.1. Implementation class for the Payment component

Listing 5.2. A remotable interface generated from a WSDL by JAX-WS: payment.Payment

Listing 5.3. The implementation for the bidirectional credit card payment service

Listing 5.4. The client implementation for the bidirectional credit card payment service

Listing 5.5. Using a CallableReference object to delegate the callback

Listing 5.6. Client implementation that sets and retrieves the callback ID

Listing 5.7. Delegating callbacks to another service

Listing 5.8. The conversational CartStore interface

Listing 5.9. The conversational CartStore component implementation

Listing 5.10. Adding fault types to the CreditCardPayment WSDL interface description

Listing 5.11. The generated payment.creditcard.AuthorizeFault_Exception

Chapter 6. Implementing components using other technologies

Listing 6.1. The Payment application context, Payment-context.xml, without SCA tags

Listing 6.2. The payment application context, Payment-context.xml, with SCA tags

Listing 6.3. The Payment Spring bean with SCA annotations

Listing 6.4. The outline of a BPEL process document

Listing 6.5. The component type derived from the payment BPEL process

Listing 6.6. A Groovy script payment component implementation

Chapter 7. Connecting components using bindings

Listing 7.1. Payment composite XML file with Web Services and RMI bindings

Listing 7.2. Payment composite with various SCA bindings on the references

Listing 7.3. The currency converter composite XML file

Listing 7.4. The currency converter Java interface

Listing 7.5. The notification composite XML file

Listing 7.6. Payment composite with various usages of the SCA default binding

Listing 7.7. Currency converter component with SCA Web Services binding

Listing 7.8. Part of the WSDL for the currency converter service

Listing 7.9. Fragment of the currency converter web service client

Listing 7.10. The SMS gateway reference with SCA Web Services binding

Listing 7.11. Schema for the SCA Web Services binding

Listing 7.12. The currency converter component with an SCA CORBA binding

Listing 7.13. Currency converter CORBA service IDL file

Listing 7.14. Fragment of the currency converter CORBA client

Listing 7.15. Notification composite XML with SMS gateway reference CORBA binding

Listing 7.16. Schema for the SCA CORBA binding

Listing 7.17. Currency converter composite with Tuscany SCA RMI binding

Listing 7.18. Fragment of the currency converter RMI client

Listing 7.19. The SMS gateway reference with SCA RMI binding

Listing 7.20. Schema for the SCA RMI binding

Listing 7.21. Currency converter component with JMS binding added

Listing 7.22. Fragment of the currency converter JMS client

Listing 7.23. SMS gateway reference with SCA JMS binding

Listing 7.24. Schema for the SCA JSM binding

Listing 7.25. Notification composite XML with SMS gateway reference EJB binding

Listing 7.26. Schema for the EJB binding

Chapter 8. Web clients and Web 2.0

Listing 8.1. Currency converter servlet invoking SCA service

Listing 8.2. Currency converter servlet web.composite file

Listing 8.3. Servlet filter to direct requests via Tuscany

Listing 8.4. Currency converter JSP invoking SCA service

Listing 8.5. Fragment of the servlet filter to direct requests via Tuscany

Listing 8.6. TuscanySCATours user interface with implementation.widget

Listing 8.7. Looking up reference from scatours.html file

Listing 8.8. Exposing the help pages using implementation.resource

Listing 8.9. TuscanySCATours blog composite exposing an Atom feed

Listing 8.10. GenericBlogFeedImpl exposes the TuscanySCATours blog

Listing 8.11. TuscanySCATours blog composite exposing an Atom feed and an RSS feed

Listing 8.12. TuscanySCATours feed logger composite accessing an Atom feed

Listing 8.13. Fragment of the FeedLoggerImpl class

Listing 8.14. TuscanySCATours feed logger composite accessing Atom and RSS feeds

Listing 8.15. Updated the FeedLoggerImpl class with RSS logging added

Chapter 9. Data representation and transformation

Listing 9.1. The WSDL definition for the CreditCardPayment service interface

Listing 9.2. Using WSDL interfaces in component references and services

Listing 9.3. AX-WS generated interface for the CreditCardPayment component

Listing 9.4. JAXB generated class for the CreditCardDetails data structure

Listing 9.5. Using generated JAXB classes within a component implementation

Listing 9.6. Generated SDO interface for CreditCardDetailsType

Listing 9.7. Introspecting the component type from the component implementation

Chapter 10. Defining and applying policy

Listing 10.1. A simplified version of the JDKLoggingPolicyInterceptor

Listing 10.2. The credit card composite application

Listing 10.3. Defining intents in the Java implementation

Listing 10.4. The CreditCardPayment definitions.xml file

Listing 10.5. BasicAuthenticationServicePolicyInterceptor invoke

Listing 10.6. The credit card authorization message with basic authentication enabled

Chapter 11. Running and embedding Tuscany

Listing 11.1. A JUnit test case that calls Tuscany APIs

Listing 11.2. Sample web.xml for a Tuscany-enabled web application

Listing 11.3. Sample WEB-INF/geronimo-web.xml

Listing 11.4. Example workspace.xml file for a domain with three installed contributions

Listing 11.5. Deployed composites are listed in the domain.composite file.

Listing 11.6. Execution nodes for deployed composites

Listing 11.7. The TripsNode.composite file representing the TripsNode execution node

Chapter 12. A complete SCA application

Listing 12.1. Loading all of the contributions that form the full travel application

Listing 12.2. The fullapp-ui.composite file from the fullapp-ui contribution

Listing 12.3. The conversational CartStore interface

Listing 12.4. The mechanics of generating a cart ID in the ShoppingCart component

Listing 12.5. The ShoppingCart component checkout operation

Chapter 14. Extending Tuscany

Listing 14.1. XML schema for implementation.pojo

Listing 14.2. The first half of the implementation.pojo processor resolve() method

Listing 14.3. The second half of the implementation.pojo processor resolve() method

Listing 14.4. The implementation provider for implementation.pojo

Listing 14.5. XML schema for binding.echo defined in sample-binding-echo.xsd

Listing 14.6. EchoBindingProviderFactory

Listing 14.7. EchoServiceBindingProvider

Listing 14.8. EchoReferenceBindingProvider

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.166.75