Hi, Nicholas, In fact, you might have used this class but didn't notice it The difference between the DataSource and XADataSource is that the latter allows you to perform distributed transactions, that is transactions across multiple resource managers (databases, JMS providers, EIS). The transaction management is controlled by the JTA transaction manager (app. server) and uses 2-phase commit protocol.
Best Regards,<br />Serge
posted 15 years ago
Hi Serge, In such sense, we do need to configure all the distributed data source? Or we need to have references for each distributed data source (since there should be no deployment descriptor for application server to define them) inside the program? In addition, does 2-pharse commit protocol the same term of 2-pharse locking protocol? Many many thanks. Nick.
Nicholas, sorry, I may have not got the question I think you don't need to do anything special configuration to use distributed transactions. What you should do is configure the connection factories in the app server and define resource references to them in the deployment descriptor for you bean. What is special is that drivers (resource managers) participating in the such a transaction must support XA (implement classes starting with XA). Also, you should set the right classes for connection factories in the server settings. In WSAD, see Datasources, JMS and J2C pages of the test environment. There's a good chapter about transactions in Mastering EJB by Ed Roman
Originally posted by Sindhu Richard: hi I'm preparing for the 484 exam. Where can I find information on advanced JDBC topics like XADataSource and ConnectionPoolDataSource ? Are there any good links/tutorials ? Thanks Sindhu
Hello Sindhu, My book has (IMHO ) excellent coverage of J2EE Connector Architecture(Chapter 10 - JCA) explaining two phase commit in terms of resource managers and transaction managers, and Connection Pooling (Chapter 14 - WebSphere Administration). I believe that you will find the treatment to be quite useful. You may also want to refer to Chapter 8, which focuses exclusively on Transactions. Regards,
Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1931182108/" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
posted 15 years ago
Thanks Serge and Pradeep, I will read more on this issue. Many thanks! Nick.
In addition, does 2-pharse commit protocol the same term of 2-pharse locking protocol? Many many thanks. Nick.
Hi Nick, 2-phase locking is not the same as 2-phase commit. 2PL ensures a serializable schedule, while 2PC ensures the atomicity of global/distributed transactions. With 2-phase locking, you have 2 distinct phases, namely, growing and shrinking phases. In the 1st phase, you can only acquire locks - no unlocks. In the 2nd phase, you can only unlock stuff - no more acquisitions. The shrinking phase starts with the first lock release. There are more complex variations but the basic idea remains the same. Hope this helps. Zach
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.