transaction implementation using wsit - slides
DESCRIPTION
Web Services and Transactions using Web services interoperability toolkit. Slides on the implementation. I would appreciate sincere comments if any.TRANSCRIPT
![Page 1: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/1.jpg)
IMPLEMENT A TRANSACTION
USING A WEB SERVICE
COMP6017 – CourseWorkCOMP6017 – CourseWork
MSc. Web Technology 2009-2010
Chen, Cheng-Che : 23361301
GK, Eakan : 23813172
Sun, Wei : 23656018
![Page 2: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/2.jpg)
Agenda
� Transaction – A brief Introduction
� Transactions in Web Services
� WS Co-ordination and WS Transaction
� Web Services Interoperability Toolkit� Web Services Interoperability Toolkit
� NetBeans IDE Integrated with WSIT
� Implementation
� Questions (if any)
![Page 3: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/3.jpg)
Transaction� What is a Transaction?
� ACID Properties
Atomic, Consistent, isolated, and durable (ACID)
![Page 4: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/4.jpg)
Transactions in Web Services
� In Web Service transactions we do not need to
abide to the ACID properties. But for long
transactions consistency has to be maintained.
� Need some forms of correlation, but not necessarily
require transaction behavior.
![Page 5: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/5.jpg)
WS-Coordination
� The primary goal of WS-Coordination
� Components of WS-Coordination:
![Page 6: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/6.jpg)
WS-Coordination
� WS-Coordination addresses fundamental issues in
coordination among Web services:
1. SOAP extensions
2. Meta-protocols2. Meta-protocols
3. Middleware components
![Page 7: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/7.jpg)
WS-Transaction
� Atomic Transactions:
Completion, 2PC, Completion WithAck, PhaseZero,
OutcomeNotification.
� Business Activities:� Business Activities:
BusinessAgreement ,
BusinessAgreementWithComplete
![Page 8: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/8.jpg)
Web Services Interoperability Technologies
� What is WSIT?
-- A product of Sun Microsystems web services
interoperability to develop Java clients and service
providers.providers.
-- An implementation of a number of open web
services specifications to support enterprise features.
![Page 9: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/9.jpg)
Web Services Interoperability Technologies
� Goal
> Interoperability with Microsoft Windows
Communication Foundation (WCF, a.k.a. “Indigo”)
> Implementation of WS-* specifications> Implementation of WS-* specifications
> Foundation for building SOA
![Page 10: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/10.jpg)
WSIT Features� Bootstrapping and Configuration
� Message Optimization Technology
� Reliable Messaging Technology
� WS-Security
![Page 11: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/11.jpg)
Implementation
� NetBeans IDE
� GlassFish v2.1
� Java EE
� Java Metro Stack(Project Tango)� Java Metro Stack(Project Tango)
� Web Services Interoperability Toolkit
� Java WS
� Enterprise Java Beans
� Java Transaction API
![Page 12: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/12.jpg)
EJB : BankWebServiceBean
� public void init()
� public int debitAccount(String accnum, String amount)
� public int creditAccount(String accnum, String amount)
![Page 13: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/13.jpg)
Web Service Attributes
![Page 14: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/14.jpg)
Screen-shots of Client – Main Page
![Page 15: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/15.jpg)
Screen-shots of Client – AccountDetails
![Page 16: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/16.jpg)
TransferServlet
public class TransferServlet extends HttpServlet {
...
..
@Resource
UserTransaction ut;
..
..
@WebServiceRef(wsdlLocation = "WEB-
INF/wsdl/localhost_8080/BankWebServiceBeanService/BankWe
bServiceBean.wsdl")
private BankWebServiceBeanService service;
![Page 17: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/17.jpg)
TransferServlet : processRequestprotected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException,
Exception {
...
bwsb.BankWebServiceBean port =
service.getBankWebServiceBeanPort();
..
port.init();port.init();
try {
ut.begin(); //demarcate beginning of transaction
result = port.debitAccount(dest_account, amount);
result = port.creditAccount(dest_account, amount);
ut.commit();
}catch(Exception e) {ut.rollback();}
![Page 18: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/18.jpg)
References:� Java EE 5 Tutorial, Sun Microsystems
� Java Web Services Tutorial, Sun Microsystems
� Teach Yourself Web Services in 24 Hours, Sams
Publishing
� NetBeans : The Definitive Guide, O’ReillyNetBeans : The Definitive Guide, O’Reilly
� Project Tango: Overview, Sun Microsystems
� WSIT Tutorial, Sun Microsystems
� WS Atomic Transaciton, WS Coordination
![Page 19: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/19.jpg)
Questions
![Page 20: Transaction Implementation Using WSIT - Slides](https://reader034.vdocuments.us/reader034/viewer/2022042521/5527a34e550346e1358b4888/html5/thumbnails/20.jpg)
Hebrew
MerciFrench
Grazie
GraciasSpanish
ObrigadoBrazilian
Portuguese
Arabic
Traditional Chinese
Korean
Hindi
go raibh maith agatGaelic
Tak
TrugarezBreton
Tack så mycketSwedish
Japanese
Thank YouEnglish
DankeGerman
GrazieItalian
Simplified Chinese
Thai
Tamil
TakDanish
Dutch
Dank u
Czech
Dekujeme Vam
DankonEsperanto