Introduction
This tutorial gives you a practical understanding of Web Services Atomic Transaction, also known as WS-AT technology, and present a step-by-step guide to create a real enterprise application using WS-AT, a web service, and an EJB component. (For an introduction to WS-AT, see What is WS-AT?.) This simple example begins a JTA transaction (a global unit of work for Java(TM) 2 Enterprise Environment (J2EE) components) in an EJB component, and propagates it to a web service using WS-AT. By the end of this tutorial, you will have created a distributed enterprise scenario comprising an EJB component and a web service.
This tutorial is a hands-on, practical example showing a WS-AT scenario. Before you begin, you should be familiar with WS-AT technology, web services, and transaction fundamentals. For more information about these technologies, please refer to the first article I have written on WS-AT, "Distributed transactions with WS-Transaction and JTA" (see Resources for a link).
Before you begin, you need to have IBM® WebSphere® Application Server V5.0.2 (Application Server) and WebSphere Studio Application Developer V5.0 (Application Developer) installed on a machine.
In the second tutorial in this series, you will deploy the WS-AT code you've written here on Application Server V5.02 and see the WS-AT Tech Preview actually running.
WS-AT allows a web service to participate in an activity that can be coordinated with other web services, enterprise components (EJB components and servlets), and even other non-J2EE components.
Before WS-AT, web services could only use transaction services for work demarcated within the scope of the web service. WS-AT assists in propagating transactional contexts on invocations into or out of a web service.
This tutorial has eight sections. The main sections define entry and exit criteria that you must satisfy before starting the section or moving on to the next section. Some sections begin with one or more definitions that help you understand the terms used in the section. The sections are broken down as follows:
- Introduction
- Create a CMT EJB component
- Create a CMT bean
- Implement the CMT bean
- Assign transactional properties to methods
- Create a SEI from the bean
- Create WSDL from Java code and Java code from WSDL
- Generate WSDL from the SEI
- Generate Java supporting classes and bindings from WSDL
- Create and configure a JAR file
- Configure the template files
- Update the EJB JAR file
- Wrap up the enterprise application
- Update the EAR file with the web services-enabled EJB JAR file
- Enable the EAR file
- Create the client code and bindings
- Create an enterprise application and a BMT bean
- Implement the BMT bean
- Convert the client to a web services-enabled client
- Assemble a web services-enabled client JAR and EAR
- Wrap-up

