672329 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

General J2EE General J2EE General J2EE Messages: 15 Messages: 15 Messages: 15 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

XA and NonXA datasource

Posted by: Majic Robot on September 11, 2003 DIGG
Hi Folks,

Can anybody please tell me the definition for XA datasource and NonXA datasource?What is XA stands for?

Where can I find documentation/tutorial to understand XA/NonXA more?

Thanks

-Selvaraj

Threaded replies

·  XA and NonXA datasource by Majic Robot on Thu Sep 11 12:02:56 EDT 2003
  ·  read the JDBC spec by Sean Sullivan on Thu Sep 11 13:03:26 EDT 2003
    ·  read the JDBC spec by Paul Strack on Thu Sep 11 15:57:08 EDT 2003
  ·  XA and NonXA datasource by Mike Spille on Thu Sep 11 17:28:55 EDT 2003
    ·  XA and NonXA datasource by Huy Nguyen on Thu Sep 11 20:56:36 EDT 2003
      ·  XA and NonXA datasource by Majic Robot on Fri Sep 12 09:55:34 EDT 2003
      ·  Re: XA and NonXA datasource by Arnab Mitra on Mon Feb 25 03:48:49 EST 2008
        ·  nice explanation by Ravish Singh on Tue Nov 18 02:46:20 EST 2008
    ·  Thanks by Hatem El-Kazak on Sun Feb 05 10:30:04 EST 2006
      ·  XA by Vrushali Joshi on Mon Apr 17 14:49:23 EDT 2006
    ·  Re: XA and NonXA datasource by Tenzing N Wangdi on Thu Jul 13 04:10:44 EDT 2006
    ·  Nicely and concisely explained, Mike. by stephen zhang on Sun Jul 01 20:57:50 EDT 2007
    ·  thanks for the valuable information by Mukthiyar ahmed on Thu Feb 05 02:36:40 EST 2009
  ·  XA and NonXA datasource by Ananta Vijay Guha on Thu Jan 20 06:22:37 EST 2005
  ·  XA and NonXA datasource by Shomaila Kausar on Mon Dec 05 09:54:09 EST 2005
  ·  very good explanation by Samir Sahu on Mon Dec 10 02:29:37 EST 2007
  Message #95308 Post reply Post reply Post reply Go to top Go to top Go to top

read the JDBC spec

Posted by: Sean Sullivan on September 11, 2003 in response to Message #95297
read the JDBC specification

http://java.sun.com/products/jdbc

  Message #95334 Post reply Post reply Post reply Go to top Go to top Go to top

read the JDBC spec

Posted by: Paul Strack on September 11, 2003 in response to Message #95308
As for what they mean: XA are for distributed transactions (as per the Open Group specificitions) and non-XA are not (transactions must be single-database).

  Message #95346 Post reply Post reply Post reply Go to top Go to top Go to top

XA and NonXA datasource

Posted by: Mike Spille on September 11, 2003 in response to Message #95297
An XA transaction, in the most general terms, is a "global transaction" that may span multiple resources. A non-XA transaction always involves just one resource.

An XA transaction involves a coordinating transaction manager, with one or more databases (or other resources, like JMS) all involved in a single global transaction. Non-XA transactions have no transaction coordinator, and a single resource is doing all its transaction work itself (this is sometimes called local transactions).

XA transactions come from the X/Open group specification on distributed, global transactions. JTA includes the X/Open XA spec, in modified form.

Most stuff in the world is non-XA - a Servlet or EJB or plain old JDBC in a Java application talking to a single database. XA gets involved when you want to work with multiple resources - 2 or more databases, a database and a JMS connection, all of those plus maybe a JCA resource - all in a single transaction. In this scenario, you'll have an app server like Websphere or Weblogic or JBoss acting as the Transaction Manager, and your various resources (Oracle, Sybase, IBM MQ JMS, SAP, whatever) acting as transaction resources. Your code can then update/delete/publish/whatever across the many resources. When you say "commit", the results are commited across all of the resources. When you say "rollback", _everything_ is rolled back across all resources.

The Transaction Manager coordinates all of this through a protocol called Two Phase Commit (2PC). This protocol also has to be supported by the individual resources.

In terms of datasources, an XA datasource is a data source that can participate in an XA global transaction. A non-XA datasource generally can't participate in a global transaction (sort of - some people implement what's called a "last participant" optimization that can let you do this for exactly one non-XA item).

For more details - see the JTA pages on java.sun.com. Look at the XAResource and Xid interfaces in JTA. See the X/Open XA Distributed Transaction specification. Do a google source on "Java JTA XA transaction".

    -Mike

  Message #95358 Post reply Post reply Post reply Go to top Go to top Go to top

XA and NonXA datasource

Posted by: Huy Nguyen on September 11, 2003 in response to Message #95346
Excellence Mike

very through and well explanation

huy

  Message #95407 Post reply Post reply Post reply Go to top Go to top Go to top

XA and NonXA datasource

Posted by: Majic Robot on September 12, 2003 in response to Message #95358
Same here, Thank you very much Mike!

  Message #153458 Post reply Post reply Post reply Go to top Go to top Go to top

XA and NonXA datasource

Posted by: Ananta Vijay Guha on January 20, 2005 in response to Message #95297
Great explaining Mike. Thanks a lot.
Anant.

  Message #192842 Post reply Post reply Post reply Go to top Go to top Go to top

XA and NonXA datasource

Posted by: Shomaila Kausar on December 05, 2005 in response to Message #95297
I think Xa stand for extended architecture...

  Message #199649 Post reply Post reply Post reply Go to top Go to top Go to top

Thanks

Posted by: Hatem El-Kazak on February 05, 2006 in response to Message #95346
simple yet very informative. thanks alot

  Message #206386 Post reply Post reply Post reply Go to top Go to top Go to top

XA

Posted by: Vrushali Joshi on April 17, 2006 in response to Message #199649
X/Open specification for transaction management has in it 2 specifications XA is a specification between the transaction manager and resource manager and TX is the specification for Applications and Transaction manager interaction.

All XA-compliant transactions are distributed transactions; XA supports both single-phase and two-phase commit

  Message #213453 Post reply Post reply Post reply Go to top Go to top Go to top

Re: XA and NonXA datasource

Posted by: Tenzing N Wangdi on July 13, 2006 in response to Message #95346
The Explanation is too good.

I really did not understand Whats an XA was? Thanks to MIKE.

  Message #235540 Post reply Post reply Post reply Go to top Go to top Go to top

Nicely and concisely explained, Mike.

Posted by: stephen zhang on July 01, 2007 in response to Message #95346
Good job,Mike. Your explanation is both nicely and concisely said without a leaking of technical insight. Can definitely be used to present to both mangers or developers without too much tweaking.

  Message #243542 Post reply Post reply Post reply Go to top Go to top Go to top

very good explanation

Posted by: Samir Sahu on December 10, 2007 in response to Message #95297
Mike, the explanation is very good.

  Message #247901 Post reply Post reply Post reply Go to top Go to top Go to top

Re: XA and NonXA datasource

Posted by: Arnab Mitra on February 25, 2008 in response to Message #95358
Good explanation

  Message #275748 Post reply Post reply Post reply Go to top Go to top Go to top

nice explanation

Posted by: Ravish Singh on November 18, 2008 in response to Message #247901
Nice write up Mike :)

  Message #304077 Post reply Post reply Post reply Go to top Go to top Go to top

thanks for the valuable information

Posted by: Mukthiyar ahmed on February 05, 2009 in response to Message #95346
Hi

Thanks for the clarification in the difference between the XA and Non XA

Recent active threads Recent active threads Recent active threads More More More
Oracle's Bold Plans for Java Bode Well
“Father of Java” James Gosling to keynote at TSSJS 2010
typo in faces-config to-view-id extension, but works fine?
BUY FAKE PASSPORTS OF CANADA, FAKE CANADIAN PASSPORTS FOR SALE/FAKE PASSPORTS OF USA!
BUY FAKE PASSPORTS OF UNITED KINGDOM,FAKE UK PASSPORTS FOR SALE!
BUY FAKE PASSPORTS OF CANADA, FAKE CANADIAN PASSPORTS FOR SALE!
BUY FAKE PASSPORTS OF BELGIAN,FAKE BELGIUM PASSPORTS FOR SALE!
BUY FAKE PASSPORTS OF AUSTRALIA/FAKE AUSTRALIAN PASSPORTS FOR SALE!
Milton 1.5.1 released
More active threads »
Top posters of the weekTop posters of the weekTop posters of the week
This list contains the members who have made the most posts in all forums over the last 7 days:
  1. Reza Rahman
  2. James Watson
  3. brad mcevoy
  4. Alex Besogonov
  5. Peter Monks
Hot threads Hot threads Hot threads More hot threads More hot threads More hot threads

Object pooling is now a serious performance loss

Brian Goetz continues to lift the lid and peak into the inner workings of Java in Java Urban Performance Legends. In this article he exposes the fallacy behind some of the more common performance myths found in the annals of the JVM.
(92 comments, last posted March 14, 2008)

Beyond Java

Bruce Tate, author of Better, Faster Lighter Java and Bitter EJB has come out with a new book called Beyond Java. Bruce has an epiphany about the future of software development. Does it include Java?
(770 comments, last posted September 23, 2009)

Three forms of AJAX: solid, liquid and gas.

Looks like today AJAX concept have several interpretations. We can distinguish different approaches of AJAX integration. Can they co-exist within the same application? Can we talk about layered AJAX integration?
(68 comments, last posted May 08, 2008)

Design-Time API Promises to make Java more like VB

Artima has published a short article describing the Design-Time API for JavaBeans, which was recently approved as JSR 273. This API promises to bring VB-like ease to Java development, but may face a cultural bias among Java developers who tend to think more in terms of class libraries than components.
(226 comments, last posted February 01, 2010)

Will Sun be that target of a management buyout?

There is plenty of speculation today regarding a potential buyout of Sun Microsystems by Scott McNealy and Silver Lake Partners. How would privatization of Sun affect Java?
(16 comments, last posted May 15, 2009)
More hot threads »

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy      Powered by JIVE
Site Map