Your SlideShare is downloading. ×
0
WebLogic Transasction Service  Overview BEA Systems Korea Sep,16,2003 Byungwook Cho
Agenda <ul><li>What is Transaction? </li></ul><ul><li>Transaction Processing Model </li></ul><ul><li>Transaction Isolation...
What is Transaction? (ACID) <ul><li>Atomicity  </li></ul><ul><ul><li>Database modifications must follow an all or nothing ...
Transaction Processing Model Transsaction Manager (TM) RM Resource Manager (RM) DB1 DB2 Application (AP) XA javax.transact...
Transaction Isolation Level <ul><li>Preventable Phenomena </li></ul><ul><ul><li>Dirty Read </li></ul></ul><ul><ul><li>Non ...
Transaction Isolation Level Setting <ul><li>Java </li></ul><ul><li>  conn.setTransactionIsolation(Connection.TRANSACTION_R...
Java Transaction Model <ul><li>JTA </li></ul><ul><ul><li>JTA UserTransaction  </li></ul></ul><ul><ul><li>JTA Transaction M...
Java Transaction Model
JTA (Java Transaction API) <ul><li>Definition between AP,AP Server,TM and RM </li></ul><ul><ul><li>UserTransaction (AP-TM)...
Transaction Processing in J2EE
EJB Transaction Model  (CMT) <ul><li>Declarative Transaction demarcation </li></ul>Error TX_A NO_TRAN NO_TX Never TX_A TX_...
Transaction scope <ul><li>Transaction scope </li></ul><ul><ul><li>Stand alone server </li></ul></ul><ul><ul><li>Non-cluste...
Transaction Parameter <ul><li>TimeoutSeconds (30) </li></ul><ul><li>MaxTransactions (10000) </li></ul><ul><li>MaxUniqueNam...
Transaction Monitoring <ul><li>Transaction Statistics for Server </li></ul><ul><ul><li>Servers > Server > Monitoring > JTA...
Transaction Recovery <ul><li>Recovering Transactions for a Failed Non-Clustered Server </li></ul><ul><ul><li>Copy tlog fil...
JTA Debug Options <ul><li>All test runs about JTA </li></ul><ul><ul><li>Dweblogic.Debug=weblogic.JTA,weblogic.JTAXA,weblog...
Data Source <ul><li>DataSource </li></ul><ul><ul><li>For local transaction only </li></ul></ul><ul><li>TxDataSource </li><...
<ul><li>For more Information ( [email_address] ) </li></ul><ul><ul><li>Java Transaction Summary (Next B.E.S.T.) </li></ul>...
Upcoming SlideShare
Loading in...5
×

J2ee Transaction Overview

3,740

Published on

Describes transaction model and j2ee transaction architecture

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,740
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
94
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "J2ee Transaction Overview"

  1. 1. WebLogic Transasction Service Overview BEA Systems Korea Sep,16,2003 Byungwook Cho
  2. 2. Agenda <ul><li>What is Transaction? </li></ul><ul><li>Transaction Processing Model </li></ul><ul><li>Transaction Isolation Level </li></ul><ul><li>Java Transaction Model </li></ul><ul><li>JTA </li></ul><ul><li>EJB Transaction Model </li></ul><ul><li>WebLogic Transaction Scope </li></ul><ul><li>WebLogic Transaction Parameter </li></ul><ul><li>WebLogic Transaction Monitoring </li></ul><ul><li>WebLogic Transaction Recovery </li></ul><ul><li>JTA Debug Options </li></ul><ul><li>About Data Source </li></ul>
  3. 3. What is Transaction? (ACID) <ul><li>Atomicity </li></ul><ul><ul><li>Database modifications must follow an all or nothing </li></ul></ul><ul><li>Consistency </li></ul><ul><ul><li>States that only valid data will be written to the database </li></ul></ul><ul><li>Isolation </li></ul><ul><ul><li>Multiple transactions occurring at the same time not impact each other execution </li></ul></ul><ul><li>Durability </li></ul><ul><ul><li>Ensures that any transaction commited to the database will not be lost </li></ul></ul>
  4. 4. Transaction Processing Model Transsaction Manager (TM) RM Resource Manager (RM) DB1 DB2 Application (AP) XA javax.transaction.xa.XAResource javax.transaction.TransactionManager                        
  5. 5. Transaction Isolation Level <ul><li>Preventable Phenomena </li></ul><ul><ul><li>Dirty Read </li></ul></ul><ul><ul><li>Non Repeatable Read </li></ul></ul><ul><ul><li>Phantom Read </li></ul></ul><ul><li>Transaction Isolation Level </li></ul>* Oracle X X X Serializable * O X X Repeatable read O O X Read commited * O O O Read uncommited Phantom Non-Repeatable Dirty Read Isolation Level
  6. 6. Transaction Isolation Level Setting <ul><li>Java </li></ul><ul><li> conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); </li></ul><ul><li>System.out.println(conn.getTransactionIsolation()); </li></ul><ul><li>Oracle </li></ul><ul><ul><li>SET TRANSACTION ISOLATION LEVEL READ COMMITED; </li></ul></ul><ul><ul><li>SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; </li></ul></ul>
  7. 7. Java Transaction Model <ul><li>JTA </li></ul><ul><ul><li>JTA UserTransaction </li></ul></ul><ul><ul><li>JTA Transaction Manager </li></ul></ul><ul><ul><li>JTA XAResource </li></ul></ul><ul><li>JTS </li></ul><ul><li>EJB </li></ul>
  8. 8. Java Transaction Model
  9. 9. JTA (Java Transaction API) <ul><li>Definition between AP,AP Server,TM and RM </li></ul><ul><ul><li>UserTransaction (AP-TM) </li></ul></ul><ul><ul><li>TransactionManager (TM-APS) </li></ul></ul><ul><ul><ul><li>start TX,commit,rollback,suspend,resume. </li></ul></ul></ul><ul><ul><li>XAResource (TM-RM) </li></ul></ul><ul><ul><li>Transaction </li></ul></ul><ul><ul><ul><li>enlist,delist Resource </li></ul></ul></ul><ul><ul><ul><li>synchronization </li></ul></ul></ul><ul><ul><li>Xid </li></ul></ul><ul><ul><ul><li>Format ID,global transaction ID,branch qualifier </li></ul></ul></ul>
  10. 10. Transaction Processing in J2EE
  11. 11. EJB Transaction Model (CMT) <ul><li>Declarative Transaction demarcation </li></ul>Error TX_A NO_TRAN NO_TX Never TX_A TX_A Error NO_TX Mandatory NO_TX TX_A NO_TX NO_TX Not Supported TX_A TX_A NO_TX NO_TX Support TX_NEW TX_A TX_NEW NO_TX Required New TX_A TX_A TX_NEW NO_TX Required EJB TX Client TX TX Attr
  12. 12. Transaction scope <ul><li>Transaction scope </li></ul><ul><ul><li>Stand alone server </li></ul></ul><ul><ul><li>Non-clustered servers </li></ul></ul><ul><ul><li>Clustered servers </li></ul></ul><ul><ul><li>Inter domain transaction ( 6.1 Disable, 7.0 8.1 Enable) </li></ul></ul><ul><li>Inter domain transaction </li></ul><ul><ul><li>7.0,8.1 enable </li></ul></ul><ul><ul><li>Between 6.1 disable </li></ul></ul><ul><ul><li>Between 6.1 and 7.0,8.1 enable </li></ul></ul>
  13. 13. Transaction Parameter <ul><li>TimeoutSeconds (30) </li></ul><ul><li>MaxTransactions (10000) </li></ul><ul><li>MaxUniqueNameStatistics (1000) </li></ul><ul><li>AbandonTimeoutSeconds (86400 sec/24hours) </li></ul><ul><li>BeforeCompletionIterationLimit </li></ul><ul><li>ForgetHeuristics (true) : *. heur.tlog </li></ul>
  14. 14. Transaction Monitoring <ul><li>Transaction Statistics for Server </li></ul><ul><ul><li>Servers > Server > Monitoring > JTA </li></ul></ul><ul><ul><li>Total Transactions </li></ul></ul><ul><ul><li>Total Commited </li></ul></ul><ul><ul><li>Total Rolled Back </li></ul></ul><ul><ul><li>Timeout Rollbacks </li></ul></ul><ul><ul><li>Resource Rollbacks </li></ul></ul><ul><ul><li>Application Rollbacks </li></ul></ul><ul><ul><li>System Rollbacks </li></ul></ul><ul><ul><li>Total Heuristics </li></ul></ul><ul><ul><li>Transaction Abandoned Total Count </li></ul></ul><ul><ul><li>Average Commit Time </li></ul></ul><ul><ul><li>※ Monitoring all Transaction by Name, by Resource </li></ul></ul><ul><ul><li>※ Monitoring all Inflight Transactions </li></ul></ul>
  15. 15. Transaction Recovery <ul><li>Recovering Transactions for a Failed Non-Clustered Server </li></ul><ul><ul><li>Copy tlog file </li></ul></ul><ul><li>Recovering Transactions for a Failed Clustered Server </li></ul><ul><ul><li>Using JTA Migration service in Console </li></ul></ul><ul><li>JTA Migration </li></ul><ul><ul><li>server > control > JTA Migration Config </li></ul></ul>
  16. 16. JTA Debug Options <ul><li>All test runs about JTA </li></ul><ul><ul><li>Dweblogic.Debug=weblogic.JTA,weblogic.JTAXA,weblogic.JTA2PC </li></ul></ul><ul><li>For capturing JTA TLOG outputs </li></ul><ul><ul><li>Dweblogic.Debug=weblogic.JTATLOG,weblogic.JTARecovery </li></ul></ul>
  17. 17. Data Source <ul><li>DataSource </li></ul><ul><ul><li>For local transaction only </li></ul></ul><ul><li>TxDataSource </li></ul><ul><ul><li>For distributed transaction </li></ul></ul><ul><ul><li>When using JTA </li></ul></ul><ul><ul><li>When using EJB to manage transaction </li></ul></ul><ul><ul><li>Access multiple resource, such as database and the JMS,during the transaction </li></ul></ul>
  18. 18. <ul><li>For more Information ( [email_address] ) </li></ul><ul><ul><li>Java Transaction Summary (Next B.E.S.T.) </li></ul></ul><ul><ul><li>Analysis of JTA Debug Logs in WLS (BEA Doc) </li></ul></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×