Friday, September 21, 2018

Oracle Weblogic - 1 - Transactions

Highlights from certification point of view :

1) EJB, JMS are out of scope of 1Z0 - 133 Certification exam ( Weblogic - Administration - 1)
2) Since 1Z0-133 is Java EE6 compliant application server implementation, it supports Java
Transaction API version 1.1 ( JTA 1.1)

Notes and Questions on Transactions :
------------------------------------------


Certification questions mainly focused on below topics from Transactions:

-> Distributed Transaction Model -Below are key characteristics of distributed
transaction processing.------(based on ACID properties
Transactions - are atomic, complete units of work
- are consistent
- are isolated
- are durable
- have clear boundaries.


Transaction Manager :

Resource Manager :

Two-Phase Commit or 2PC : As per XA specification, Transaction Manager and Resource Managers perform their work using 2PC.

"1st Phase from 2PC - is prepare phase "- Which means Transaction Manager will ask resource managers of all transaction branches to prepare to commit.
- Resource Managers will perform the work requested on the specified resources, and will report back whether or not they are able to commit the work requested.

"2nd Phase is named commit phase" - Txn manager will request all resource managers to either commit or roll back work in transaction branches.

Throughout the transaction, both the transaction manager, as well as any resource managers involved, log the state of their actions. These logs are an absolute requirement for a system to recover in-flight transactions after failure





Sequence diagram of an aborted transaction using XA and 2PC





Java Transaction API - JTA v1.1

Oracle WebLogic Server 12c fully supports distributed transactions.
It does so by virtue of implementing the JTA specification, as part of being Java EE compliant.

"Topics to focus as certification point of view "
------------------------------------------------------

--> JTA transaction model.
--> Architecture and execution protocols
--> JTA implementation details on weblogic server.
-> Configuring, Monitoring and Debugging transactions in a Weblogic Server
Domain.
->



The JTA configuration page has a good number of settable properties. The following is a list of those considered very relevant for almost every use case.
  • Timeout seconds – Maximum time a distributed transaction is allowed to remain in prepare or first phase
  • Abandon timeout seconds – Maximum time a distributed transaction is allowed to remain in commit or second phase
  • Max transactions – Maximum number of concurrent transactions to exist on a server instance
  • Execute XA calls in parallel – Whether or not to parallelize XA calls when there are threads available
  • Enable two-phase commit – Use 2PC protocol to coordinate distributed transactions
  • Maximum duration of XA calls – Maximum allowed time (in milliseconds) for a call to a resource before declaring it unavailable


Transaction Logs

Transaction managers and resource managers participate in distributed transaction record statuses at various points in time during the life of a transaction. Transaction logs also include information about committed transactions coordinated by the server that may have not been completed due to server failure. When a failed server is restarted, the transaction manager will automatically use the transaction logs to perform actions required to restore consistency.




Transaction logs are created by Oracle WebLogic Server in binary format, and can be stored in either default store[6] or use a JDBC store. It is a recommended practice to configure transaction logs to be located on highly available storage.  shows the how to configure default store type and directory on a server instance.




Monitoring


The Administration Console may be used to monitor transaction statistics on a per- server basis. The JTA tab in the Monitoring page of a server instance provides access to several information categories, displayed as tabs as well:
  • Summary
  • Transactions
  • XA resources
  • Non-XA resources
  • Transaction Log Store Connections
  • Transaction Log Store Statistics


Recommended Exercises

  1. Describe a case in which XA is not an appropriate distributed transaction architecture.
  2. Establish a transaction with a database, kill the server JVM process while the transaction is in-flight, restart the server, and verify that the state is made consistent.

Question :
------------------

1) Weblogic Server supports XA+protocol version 2.

a) true b) false

Answer - True

2) Resource managers may take part in prepare phase and be absent in commit phase of a distributed transaction

a) True b) False

Answer : a ( True)

3) XA interfaces implemented in JTA are high-level interfaces, available to applications:

a. All of them are
b. None of them are
c. Some of them are

Answer - some of them are ( which are XA)

4. Property that limits the maximum time allowed for a transaction to remain in commit phase.

a. Timeout seconds.
b. Abandon timeout seconds.
c. Maximum duration of XA calls.

Answer - c ( Maximum duration of XA calls)


No comments:

Post a Comment

Hyderabad Trip - Best Places to visit

 Best Places to Visit  in Hyderabad 1.        1. Golconda Fort Maps Link :   https://www.google.com/maps/dir/Aparna+Serene+Park,+Masj...