Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Develop enterprise apps with WS-AT and JTA

Simon Maple (Simon.Maple@uk.ibm.com), WebSphere FVT Team Leader, EMC
Simon Maple has been a Functional Verification Tester in WebSphere for over 2 years, concentrating his work on testing the WebSphere Application Server Transaction Service. He is the Functional Verification Testing team leader for transactions and activities in WebSphere based in Hursley, recently testing WS-AtomicTransaction (now downloadable on alphaworks) using WebSphere v5.0.2. You can reach Simon at Simon.Maple at uk.ibm.com.

Summary:  This tutorial gives a practical explanation of the WS-AtomicTransaction (WS-AT) technology and presents a step-by-step guide to create a real enterprise application using WS-AT, a web Service, and an Enterprise JavaBeans (EJB) service. This simple example begins a JTA transaction in an EJB service and propagates it to the web Service using WS-AT. By the end of this tutorial, you will have created a distributed enterprise scenario comprising an EJB container and a web service.

Date:  06 Jul 2004
Level:  Advanced PDF:  A4 and Letter (84 KB | 29 pages)Get Adobe® Reader®

Activity:  3030 views
Comments:  

Introduction

Objectives of this tutorial

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.


What is WS-AT?

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.


About this tutorial

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:

  1. Introduction
  2. Create a CMT EJB component
    • Create a CMT bean
    • Implement the CMT bean
    • Assign transactional properties to methods
    • Create a SEI from the bean
  3. Create WSDL from Java code and Java code from WSDL
    • Generate WSDL from the SEI
    • Generate Java supporting classes and bindings from WSDL
  4. Create and configure a JAR file
    • Configure the template files
    • Update the EJB JAR file
  5. Wrap up the enterprise application
    • Update the EAR file with the web services-enabled EJB JAR file
    • Enable the EAR file
  6. 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
  7. Wrap-up

1 of 10 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and Web services
ArticleID=137166
TutorialTitle=Develop enterprise apps with WS-AT and JTA
publish-date=07062004
author1-email=Simon.Maple@uk.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.