SlideShare a Scribd company logo
1 of 26
Ed Felt & Sriram Srinivasan
ed.felt@bea.com, srirams@bea.com
BEA Systems, Inc.
Advanced Distributed Transaction
Processing with BEA WebLogic
Server™ 6.0
Agenda
• Why use transactions?
• What capabilities does BEA WebLogic Server 6.0 provide?
• How to program?
• How to configure and monitor?
• References
• Questions & Answers
Benefit #1: Data Consistency
• Ensure data integrity when accessing more than one data store,
especially in distributed environment
• Simple model for application programmer:
A - atomic
C - consistent
I - isolated
D - durable
Benefit #2: Monitoring & Management
• A transaction is a higher-level unit of work than a database query
or an object invocation
– BEA WebLogic Server allows transactions to be given a semantic name
(“TransferFunds” or “ReserveSeat” or “CheckOut”)
– Transaction Name is reported in error messages
– Statistics subtotals categorized by Transaction Name
Benefit #3: Timeouts & Overload Protection
• Transactions are subject to timeout
– 30 second default
• Application code (or the EJB container) can mark a transaction
“rollback only”
• In an overloaded system, BEA WebLogic Server:
– Times out requests (who waits 30+ seconds for a Web page to return?)
– Avoids wasted work on “doomed” transactions
– Eventually refuses to begin new transactions when there are too many
already running (configurable parameter)
Supported Configurations
• Multiple servers may participate in a distributed transaction
– Clustered or non-clustered
– Need not be in same administrative domain
– Requires connectivity and permissions
• Clients may initiate transactions and infect multiple servers
– Commit responsibility is handed off to a server
– Clients may not enlist resources or register synchronization callbacks
• Multiple XA resources may participate in same transaction
– More than one coordinated by “two-phase commit” algorithm
Relationship with Other Subsystems
• JDBC
– Recognized any JDBC driver that implements JDBC 2.0 XA extensions
– BEA provides Type 2 XA driver for Oracle 8.1.6 client
– JDBC wrapper enhances performance
• JMS
– Supports XA, can participate in JTA transactions
– All storage types: database, file, non-persistent
• EJB
– Automatically manages transactions based on EJB’s deployment descriptor
High-Level Architecture
Transaction
Manager
XA-Capable
Resource
EJB Container
Application
JDBC
Wrapper
JTA
JDBC
JMS
XA
JDBC
JTA
Performance Optimizations
• Boxcar algorithm for multiple commit records per I/O
• One-phase commit optimization
• Read-only branch optimization
• Dynamic resource enlistment optimization
• Piggy-back transaction propagation
• Multiple operations per coordination message
• Asynchronous, parallel coordination architecture with retry
Programming APIs
• Good news! In many cases, transactions are controlled by the
EJB Container, and an application programmer writes no code for
transactions
• The UserTransaction object provides simple begin/commit/rollback
functionality for applications that need to explicitly demarcate
transaction boundaries
• More powerful transaction objects normally used by the
Application Server and EJB Container are available to applications
with complex transactional requirements
• BEA WebLogic Server extensions for convenience and added
value
JTA Interfaces
• UserTransaction
– Basic methods to begin, commit, rollback transactions and get/set status
• TransactionManager
– Adds suspend, resume, get thread’s current Transaction object
• Transaction
– Represents on transaction, controls enlistment and synchronization
• Synchronization
– Callback interface for before/after completion notification
• XAResource
• Xid
• Various exceptions and status codes
BEA WebLogic Server Extensions
• weblogic.transaction.TxHelper
– Static methods to get Transaction, UserTransaction, and
TransactionManager objects
• weblogic.transaction.Transaction
– Get/set transaction name, transaction properties
– Get/set rollback reason
– Get timeout information
– Get Xid
• weblogic.transaction.TransactionManager
– XA resource registration
– Get transaction object by Xid
– Force suspend/resume (without XA calls)
Configuration Parameters (Per Domain)
• Transaction Timeout Seconds
– Default number of seconds for transaction timeout, unless overridden by
API call or EJB container
• Abandon Timeout Seconds
– After X number of seconds, stop trying to resolve branch(es) of a committed
transaction and log an error
– Should never happen unless resource dies during commit processing and
does not come back
• Forget Heuristics
– When resource reports a heuristic completion, log an error message and
then tell resource to “forget”about that transaction
Configuration Parameters (Per Domain)
• Before Completion Iteration Limit
– Maximum number of times a server will iterate through registered
Synchronization objects for the same transaction
– Prevents infinite loops when one Synchronization callback causes another
Synchronization object registration
• Max Transactions
– Maximum number of transactions that can be simultaneously active on a
server
• Max Unique Name Statistics
– Maximum number of transaction names remembered for categorizing
statistic subtotals
Configuration Options
Configuration Parameters (Per Server)
• Transaction Log File Prefix
– Each server that coordinates a two-phase commit transaction writes to the
transaction log at commit time and reads the transaction log during crash
recovery
– A transaction log is stored in multiple files
• Space is reclaimed automatically
• Never delete these files
– Default location is server’s current directory
– Highly reliable file system is recommended (RAID, etc.)
– File naming convention:
Prefix + ServerName + 9999 + “.tlog” (9999 = unique number)
Configuration Parameters (JDBC)
• Transaction branches
– Connection pool name determines transaction branch qualifier
– Different pool names cause separate branches, even if connected to same
database
– Databases typically provide lock isolation between branches, shared locks
within a branch
– Benefits of multiple branches:
• Lock isolation protects independently developed components from unexpected
cross-interference
– Drawbacks of multiple branches:
• Lock conflicts can cause deadlock/timeout
• More overhead in transaction coordination, more XA calls
Configuration Parameters (JDBC)
• JDBCTxDataSource wrapper for non-XA database drivers
– If EnableTwoPhaseCommit=“false” (the default) and a non-XA JDBC driver
is supplied, commit() will fail unless this is the only transaction participant
– If EnableTwoPhaseCommit=“true” a non-XA JDBC driver may participate in
a transaction with multiple participants, however there is a risk that the non-
XA driver might fail at commit time
• This is reported as a heuristic rollback exception
Monitoring
• Counters
– Overall
– Subtotal by XAResource
– Subtotal by Transaction name
• Specific transactions
– List transactions more than XX seconds old
– “Old” transactions are the most interesting ones
Monitoring Summary
Monitoring Stats by Name
Monitoring Stats by Resource
Monitoring Individual Transactions
Coming Attractions
• Ongoing integration testing and cooperation with XA resource
providers
• Support for transaction export/import to/from external systems via
interposed gateway architecture
• Additional internal enhancements for reliability, overload tolerance,
and performance
• Additional management, monitoring, statistics
References
• Specifications
– http://www.java.sun.com/products/jta
– http://www.java.sun.com/j2ee
• BEA WebLogic Server 6.0 Documentation
– http://e-docs.bea.com
• News Group
– news://newsgroups.bea.com/weblogic.developer.interest.transaction
Questions & Answers

More Related Content

Similar to BEA_eworld_2001_jta.ppt

transactions-advanced for automatic payment.pptx
transactions-advanced for automatic payment.pptxtransactions-advanced for automatic payment.pptx
transactions-advanced for automatic payment.pptxssusereced02
 
5 Years of Progress in Active Data Warehousing
5 Years of Progress in Active Data Warehousing5 Years of Progress in Active Data Warehousing
5 Years of Progress in Active Data WarehousingTeradata
 
AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7WASdev Community
 
AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7Kevin Sutter
 
Web Basics
Web BasicsWeb Basics
Web BasicsHui Xie
 
8 application servers_v2
8 application servers_v28 application servers_v2
8 application servers_v2ashish61_scs
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webC2B2 Consulting
 
Integrity of data lucas jellema
Integrity of data   lucas jellemaIntegrity of data   lucas jellema
Integrity of data lucas jellemaNLJUG
 
On the integrity of data in Java Applications
On the integrity of data in Java ApplicationsOn the integrity of data in Java Applications
On the integrity of data in Java ApplicationsNLJUG
 
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleJUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleC2B2 Consulting
 
Data power v7 update - Ravi Katikala
Data power v7 update - Ravi KatikalaData power v7 update - Ravi Katikala
Data power v7 update - Ravi Katikalafloridawusergroup
 
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)Emprovise
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On ConcurrencyRodney Barlow
 
4. (mjk) extreme performance 2
4. (mjk) extreme performance 24. (mjk) extreme performance 2
4. (mjk) extreme performance 2Doina Draganescu
 
Stateful Interaction In Serverless Architecture With Redis: Pyounguk Cho
Stateful Interaction In Serverless Architecture With Redis: Pyounguk ChoStateful Interaction In Serverless Architecture With Redis: Pyounguk Cho
Stateful Interaction In Serverless Architecture With Redis: Pyounguk ChoRedis Labs
 
Rails Request & Middlewares
Rails Request & MiddlewaresRails Request & Middlewares
Rails Request & MiddlewaresSantosh Wadghule
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt20521742
 
Server system architecture
Server system architectureServer system architecture
Server system architectureFaiza Hafeez
 
Performance and Scalability Tuning
Performance and Scalability TuningPerformance and Scalability Tuning
Performance and Scalability TuningAndres March
 

Similar to BEA_eworld_2001_jta.ppt (20)

transactions-advanced for automatic payment.pptx
transactions-advanced for automatic payment.pptxtransactions-advanced for automatic payment.pptx
transactions-advanced for automatic payment.pptx
 
5 Years of Progress in Active Data Warehousing
5 Years of Progress in Active Data Warehousing5 Years of Progress in Active Data Warehousing
5 Years of Progress in Active Data Warehousing
 
AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7
 
AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7
 
Web Basics
Web BasicsWeb Basics
Web Basics
 
8 application servers_v2
8 application servers_v28 application servers_v2
8 application servers_v2
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-web
 
Introduction to weblogic
Introduction to weblogicIntroduction to weblogic
Introduction to weblogic
 
Integrity of data lucas jellema
Integrity of data   lucas jellemaIntegrity of data   lucas jellema
Integrity of data lucas jellema
 
On the integrity of data in Java Applications
On the integrity of data in Java ApplicationsOn the integrity of data in Java Applications
On the integrity of data in Java Applications
 
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleJUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
 
Data power v7 update - Ravi Katikala
Data power v7 update - Ravi KatikalaData power v7 update - Ravi Katikala
Data power v7 update - Ravi Katikala
 
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
4. (mjk) extreme performance 2
4. (mjk) extreme performance 24. (mjk) extreme performance 2
4. (mjk) extreme performance 2
 
Stateful Interaction In Serverless Architecture With Redis: Pyounguk Cho
Stateful Interaction In Serverless Architecture With Redis: Pyounguk ChoStateful Interaction In Serverless Architecture With Redis: Pyounguk Cho
Stateful Interaction In Serverless Architecture With Redis: Pyounguk Cho
 
Rails Request & Middlewares
Rails Request & MiddlewaresRails Request & Middlewares
Rails Request & Middlewares
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
 
Server system architecture
Server system architectureServer system architecture
Server system architecture
 
Performance and Scalability Tuning
Performance and Scalability TuningPerformance and Scalability Tuning
Performance and Scalability Tuning
 

Recently uploaded

定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 

Recently uploaded (20)

Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 

BEA_eworld_2001_jta.ppt

  • 1. Ed Felt & Sriram Srinivasan ed.felt@bea.com, srirams@bea.com BEA Systems, Inc. Advanced Distributed Transaction Processing with BEA WebLogic Server™ 6.0
  • 2. Agenda • Why use transactions? • What capabilities does BEA WebLogic Server 6.0 provide? • How to program? • How to configure and monitor? • References • Questions & Answers
  • 3. Benefit #1: Data Consistency • Ensure data integrity when accessing more than one data store, especially in distributed environment • Simple model for application programmer: A - atomic C - consistent I - isolated D - durable
  • 4. Benefit #2: Monitoring & Management • A transaction is a higher-level unit of work than a database query or an object invocation – BEA WebLogic Server allows transactions to be given a semantic name (“TransferFunds” or “ReserveSeat” or “CheckOut”) – Transaction Name is reported in error messages – Statistics subtotals categorized by Transaction Name
  • 5. Benefit #3: Timeouts & Overload Protection • Transactions are subject to timeout – 30 second default • Application code (or the EJB container) can mark a transaction “rollback only” • In an overloaded system, BEA WebLogic Server: – Times out requests (who waits 30+ seconds for a Web page to return?) – Avoids wasted work on “doomed” transactions – Eventually refuses to begin new transactions when there are too many already running (configurable parameter)
  • 6. Supported Configurations • Multiple servers may participate in a distributed transaction – Clustered or non-clustered – Need not be in same administrative domain – Requires connectivity and permissions • Clients may initiate transactions and infect multiple servers – Commit responsibility is handed off to a server – Clients may not enlist resources or register synchronization callbacks • Multiple XA resources may participate in same transaction – More than one coordinated by “two-phase commit” algorithm
  • 7. Relationship with Other Subsystems • JDBC – Recognized any JDBC driver that implements JDBC 2.0 XA extensions – BEA provides Type 2 XA driver for Oracle 8.1.6 client – JDBC wrapper enhances performance • JMS – Supports XA, can participate in JTA transactions – All storage types: database, file, non-persistent • EJB – Automatically manages transactions based on EJB’s deployment descriptor
  • 9. Performance Optimizations • Boxcar algorithm for multiple commit records per I/O • One-phase commit optimization • Read-only branch optimization • Dynamic resource enlistment optimization • Piggy-back transaction propagation • Multiple operations per coordination message • Asynchronous, parallel coordination architecture with retry
  • 10. Programming APIs • Good news! In many cases, transactions are controlled by the EJB Container, and an application programmer writes no code for transactions • The UserTransaction object provides simple begin/commit/rollback functionality for applications that need to explicitly demarcate transaction boundaries • More powerful transaction objects normally used by the Application Server and EJB Container are available to applications with complex transactional requirements • BEA WebLogic Server extensions for convenience and added value
  • 11. JTA Interfaces • UserTransaction – Basic methods to begin, commit, rollback transactions and get/set status • TransactionManager – Adds suspend, resume, get thread’s current Transaction object • Transaction – Represents on transaction, controls enlistment and synchronization • Synchronization – Callback interface for before/after completion notification • XAResource • Xid • Various exceptions and status codes
  • 12. BEA WebLogic Server Extensions • weblogic.transaction.TxHelper – Static methods to get Transaction, UserTransaction, and TransactionManager objects • weblogic.transaction.Transaction – Get/set transaction name, transaction properties – Get/set rollback reason – Get timeout information – Get Xid • weblogic.transaction.TransactionManager – XA resource registration – Get transaction object by Xid – Force suspend/resume (without XA calls)
  • 13. Configuration Parameters (Per Domain) • Transaction Timeout Seconds – Default number of seconds for transaction timeout, unless overridden by API call or EJB container • Abandon Timeout Seconds – After X number of seconds, stop trying to resolve branch(es) of a committed transaction and log an error – Should never happen unless resource dies during commit processing and does not come back • Forget Heuristics – When resource reports a heuristic completion, log an error message and then tell resource to “forget”about that transaction
  • 14. Configuration Parameters (Per Domain) • Before Completion Iteration Limit – Maximum number of times a server will iterate through registered Synchronization objects for the same transaction – Prevents infinite loops when one Synchronization callback causes another Synchronization object registration • Max Transactions – Maximum number of transactions that can be simultaneously active on a server • Max Unique Name Statistics – Maximum number of transaction names remembered for categorizing statistic subtotals
  • 16. Configuration Parameters (Per Server) • Transaction Log File Prefix – Each server that coordinates a two-phase commit transaction writes to the transaction log at commit time and reads the transaction log during crash recovery – A transaction log is stored in multiple files • Space is reclaimed automatically • Never delete these files – Default location is server’s current directory – Highly reliable file system is recommended (RAID, etc.) – File naming convention: Prefix + ServerName + 9999 + “.tlog” (9999 = unique number)
  • 17. Configuration Parameters (JDBC) • Transaction branches – Connection pool name determines transaction branch qualifier – Different pool names cause separate branches, even if connected to same database – Databases typically provide lock isolation between branches, shared locks within a branch – Benefits of multiple branches: • Lock isolation protects independently developed components from unexpected cross-interference – Drawbacks of multiple branches: • Lock conflicts can cause deadlock/timeout • More overhead in transaction coordination, more XA calls
  • 18. Configuration Parameters (JDBC) • JDBCTxDataSource wrapper for non-XA database drivers – If EnableTwoPhaseCommit=“false” (the default) and a non-XA JDBC driver is supplied, commit() will fail unless this is the only transaction participant – If EnableTwoPhaseCommit=“true” a non-XA JDBC driver may participate in a transaction with multiple participants, however there is a risk that the non- XA driver might fail at commit time • This is reported as a heuristic rollback exception
  • 19. Monitoring • Counters – Overall – Subtotal by XAResource – Subtotal by Transaction name • Specific transactions – List transactions more than XX seconds old – “Old” transactions are the most interesting ones
  • 24. Coming Attractions • Ongoing integration testing and cooperation with XA resource providers • Support for transaction export/import to/from external systems via interposed gateway architecture • Additional internal enhancements for reliability, overload tolerance, and performance • Additional management, monitoring, statistics
  • 25. References • Specifications – http://www.java.sun.com/products/jta – http://www.java.sun.com/j2ee • BEA WebLogic Server 6.0 Documentation – http://e-docs.bea.com • News Group – news://newsgroups.bea.com/weblogic.developer.interest.transaction