[jboss-svn-commits] JBL Code SVN: r20977 - in labs/jbosstm/trunk/ArjunaJTS/trailmap: docs/images and 3 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Jul 9 11:07:01 EDT 2008
Author: jhalliday
Date: 2008-07-09 11:07:01 -0400 (Wed, 09 Jul 2008)
New Revision: 20977
Added:
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/look_and_feel/JBoss_DivOfRH_RGB.gif
Removed:
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/look_and_feel/arjuna_logo.gif
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/look_and_feel/arjuna_logo_id.gif
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/look_and_feel/arjuna_strapline.gif
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/partners/
Modified:
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/DTP.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/EJB_Transactions.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_Configuration.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_ORBPortability.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_Recovery.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JDBC_Transactions.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JTA_Overview.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/ots_overview.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/trailmap_additional.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/www_arjuna_com_navigation.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/index.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/next.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/ots_overview.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part1.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part2.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part3.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part4.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jta.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_explicit.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_implicit.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_local.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jta.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jts.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jtsDistributed.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jtsLocal.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_jdbc_banking.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_jdbc_introduction.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_account.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_bankImpl.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_bankServer.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_deploy.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_develop.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_introduction.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part7.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/xopen_overview.xml
labs/jbosstm/trunk/ArjunaJTS/trailmap/xsl/ATL_LookAndFeel.xsl
Log:
Updated trailmap to remove some obsolete arjuna naming etc and reflect newer versions.
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/DTP.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/DTP.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/DTP.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Overview of the Distributed Transaction Processing" rootpath="../..">
+<page title="JBossTS Trail map: Overview of the Distributed Transaction Processing" rootpath="../..">
<header>
Trail map: Overview of the Distributed Transaction Processing
</header>
@@ -36,24 +36,24 @@
<area title="Overview of the Distributed Transaction Processing">
<html>
<h4>What is a Transaction</h4>
- <p>Transaction management is one of the most crucial requirements for enterprise application development. Most of the large enterprise applications
+ <p>Transaction management is one of the most crucial requirements for enterprise application development. Most of the large enterprise applications
in the domains of finance, banking and electronic commerce rely on transaction processing for delivering their business functionality. </p>
- <p>Enterprise applications often require concurrent access to distributed data shared amongst multiple components, to perform operations on data. Such
+ <p>Enterprise applications often require concurrent access to distributed data shared amongst multiple components, to perform operations on data. Such
applications should maintain integrity of data (as defined by the business rules of the application) under the following circumstances: </p>
<ul>
<li>distributed access to a single resource of data, and </li>
<li>access to distributed resources from a single application component.
</li>
</ul>
- <p>In such cases, it may be required that a group of operations on (distributed) resources be treated as one unit of work. In a unit of work, all
+ <p>In such cases, it may be required that a group of operations on (distributed) resources be treated as one unit of work. In a unit of work, all
the participating operations should either succeed or fail and recover together. This problem is more complicated when </p>
<ul>
<li>a unit of work is implemented across a group of distributed components operating on data from multiple resources, and/or </li>
<li>the participating operations are executed sequentially or in parallel threads requiring coordination and/or synchronization. </li>
</ul>
- <p>In either case, it is required that success or failure of a unit of work be maintained by the application. In case of a failure, all the resources should
+ <p>In either case, it is required that success or failure of a unit of work be maintained by the application. In case of a failure, all the resources should
bring back the state of the data to the previous state (<i>i.e.,</i> the state prior to the commencement of the unit of work). </p>
- <p> From the programmer's perspective a transaction is a scoping mechanism for a collection of actions which must complete as a unit. It provides a
+ <p> From the programmer's perspective a transaction is a scoping mechanism for a collection of actions which must complete as a unit. It provides a
simplified model for exception handling since only two outcomes are possible: </p>
<ul>
<li> success - meaning that all actions involved within a transaction are completed </li>
@@ -62,80 +62,80 @@
<img src="includes/trans_succes_failure.GIF"/>
<h5>Example</h5>
<br>
- To illustrate the reliability expected by the application let’s consider the funds transfer example which is familiar to all of us.
+ To illustrate the reliability expected by the application let’s consider the funds transfer example which is familiar to all of us.
</br>
-
+
The Money transfer involves two operations: Deposit and Withdrawal
-
+
<br>
- The complexity of implementation doesn't matter; money moves from one place to
- another. For instance, involved accounts may be either located in a same relational table within
+ The complexity of implementation doesn't matter; money moves from one place to
+ another. For instance, involved accounts may be either located in a same relational table within
a database or located on different databases.
</br>
<br>
- A Simple transfer consists on moving money from savings to checking while a Complex transfer can be performed at the end- of- day according
+ A Simple transfer consists on moving money from savings to checking while a Complex transfer can be performed at the end- of- day according
to a reconciliation between international banks </br>
<img border="0" src="includes/example_transfer.GIF"/>
<a name="Introduction">
<a name="What is a Transaction"/>
- <p>The concept of a transaction, and a transaction manager (or a transaction
- processing service) simplifies construction of such enterprise level
- distributed applications while maintaining integrity of data in a unit of
+ <p>The concept of a transaction, and a transaction manager (or a transaction
+ processing service) simplifies construction of such enterprise level
+ distributed applications while maintaining integrity of data in a unit of
work. </p>
</a>
<p>A transaction is a unit of work that has the following properties: </p>
<ul>
<li>
- <strong>Atomicity</strong> – either the whole transaction completes or
+ <strong>Atomicity</strong> – either the whole transaction completes or
nothing completes - partial completion is not permitted. </li>
<li>
- <strong>Consistency</strong> – a transaction transforms the system from
- one consistent state to another. In other words, On completion of a
- successful transaction, the data should be in a consistent state. For
- example, in the case of relational databases, a consistent transaction
+ <strong>Consistency</strong> – a transaction transforms the system from
+ one consistent state to another. In other words, On completion of a
+ successful transaction, the data should be in a consistent state. For
+ example, in the case of relational databases, a consistent transaction
should preserve all the integrity constraints defined on the data. </li>
<li>
- <b>Isolation:</b> Each transaction should appear to execute
- independently of other transactions that may be executing concurrently in
- the same environment. The effect of executing a set of transactions serially
- should be the same as that of running them concurrently. This requires two
+ <b>Isolation:</b> Each transaction should appear to execute
+ independently of other transactions that may be executing concurrently in
+ the same environment. The effect of executing a set of transactions serially
+ should be the same as that of running them concurrently. This requires two
things:
<ul>
- <li>During the course of a transaction, intermediate (possibly
- inconsistent) state of the data should not be exposed to all other
+ <li>During the course of a transaction, intermediate (possibly
+ inconsistent) state of the data should not be exposed to all other
transactions. </li>
- <li>Two concurrent transactions should not be able to operate on the same
- data. Database management systems usually implement this feature using
+ <li>Two concurrent transactions should not be able to operate on the same
+ data. Database management systems usually implement this feature using
locking. </li>
</ul>
</li>
<li>
- <b>Durabiliy:</b> The effects of a completed transaction should always
+ <b>Durabiliy:</b> The effects of a completed transaction should always
be persistent. </li>
</ul>
- <p>These properties, called as <b>ACID</b> properties, guarantee that a
- transaction is never incomplete, the data is never inconsistent, concurrent
+ <p>These properties, called as <b>ACID</b> properties, guarantee that a
+ transaction is never incomplete, the data is never inconsistent, concurrent
transactions are independent, and the effects of a transaction are persistent.
</p>
<h4>Transactional Concepts</h4>
<h5>Transaction Components</h5>
- <p>A collection of actions is said to be transactional if they possess the ACID properties. These properties
-are assumed to be ensured, in the presence of failures; if actions involved within the transaction
-are performed by a Transactional System. A transaction system includes a set of components where each of
+ <p>A collection of actions is said to be transactional if they possess the ACID properties. These properties
+are assumed to be ensured, in the presence of failures; if actions involved within the transaction
+are performed by a Transactional System. A transaction system includes a set of components where each of
them has a particular role. Main components are described below. </p>
<div style="mso-line-spacing:"100 30 0";mso-char-wrap:1;mso-kinsoku-overflow:1">
<img border="0" src="includes/transaction_components.GIF"/>
<h5>
- <span style="font-family: Times New Roman" lang="en-gb">Application
+ <span style="font-family: Times New Roman" lang="en-gb">Application
Programs</span>
</h5>
- <p>Application Programs are clients for the transactional resources. These
- are the programs with which the application developer implements business
- transactions. With the help of the transaction manager, these components
- create global transactions and operate on the transactional resources with
- in the scope of these transactions. These components are not responsible
- for implementing mechanisms for preserving ACID properties of
- transactions. However, as part of the application logic, these components
+ <p>Application Programs are clients for the transactional resources. These
+ are the programs with which the application developer implements business
+ transactions. With the help of the transaction manager, these components
+ create global transactions and operate on the transactional resources with
+ in the scope of these transactions. These components are not responsible
+ for implementing mechanisms for preserving ACID properties of
+ transactions. However, as part of the application logic, these components
generally make a decision whether to commit or rollback transactions.</p>
<p>Application responsibilities could be summarized as follow:</p>
<ul>
@@ -143,19 +143,19 @@
<li>Operate on data via resource managers</li>
</ul>
<h5>
- <span style="font-family: Times New Roman" lang="en-gb">Resource
+ <span style="font-family: Times New Roman" lang="en-gb">Resource
Managers</span>
</h5>
- <p>A resource manager is in general a component that manages persistent
- and stable data storage system, and participates in the two phase commit
+ <p>A resource manager is in general a component that manages persistent
+ and stable data storage system, and participates in the two phase commit
and recovery protocols with the transaction manager. </p>
- <p>A resource manager is typically a driver that provides two
- sets of interfaces: one set for the application components to get
- connections and operating, and the other set for participating in two
- phase commit and recovery protocols coordinated by a transaction manager.
- This component may also, directly or indirectly, register resources with
- the transaction manager so that the transaction manager can keep track of
- all the resources participating in a transaction. This process is called
+ <p>A resource manager is typically a driver that provides two
+ sets of interfaces: one set for the application components to get
+ connections and operating, and the other set for participating in two
+ phase commit and recovery protocols coordinated by a transaction manager.
+ This component may also, directly or indirectly, register resources with
+ the transaction manager so that the transaction manager can keep track of
+ all the resources participating in a transaction. This process is called
as resource enlistment. </p>
<p>Resource Manager responsibilities could be summarized as follow</p>
<ul>
@@ -167,178 +167,178 @@
<font face="Times New Roman">Transaction Manager</font>
</span>
</h5>
- <p>The transaction manager is the core component of a transaction
- processing environment. Its main responsibilities are to create
- transactions when requested by application components, allow resource
- enlistment and delistment, and to manage the two-phase commit or recovery
+ <p>The transaction manager is the core component of a transaction
+ processing environment. Its main responsibilities are to create
+ transactions when requested by application components, allow resource
+ enlistment and delistment, and to manage the two-phase commit or recovery
protocol with the resource managers. </p>
- <p>A typical transactional application begins a transaction by issuing a
- request to a transaction manager to initiate a transaction. In response,
- the transaction manager starts a transaction and associates it with the
- calling thread. The transaction manager also establishes a transaction
- context. All application components and/or threads participating in the
- transaction share the transaction context. The thread that initially
- issued the request for beginning the transaction, or, if the transaction
- manager allows, any other thread may eventually terminate the transaction
+ <p>A typical transactional application begins a transaction by issuing a
+ request to a transaction manager to initiate a transaction. In response,
+ the transaction manager starts a transaction and associates it with the
+ calling thread. The transaction manager also establishes a transaction
+ context. All application components and/or threads participating in the
+ transaction share the transaction context. The thread that initially
+ issued the request for beginning the transaction, or, if the transaction
+ manager allows, any other thread may eventually terminate the transaction
by issuing a commit or rollback request. </p>
- <p>Before a transaction is terminated, any number of components and/or
- threads may perform transactional operations on any number of
- transactional resources known to the transaction manager. If allowed by
- the transaction manager, a transaction may be suspended or resumed before
+ <p>Before a transaction is terminated, any number of components and/or
+ threads may perform transactional operations on any number of
+ transactional resources known to the transaction manager. If allowed by
+ the transaction manager, a transaction may be suspended or resumed before
finally completing the transaction. </p>
- <p>Once the application issues the commit request, the transaction manager
- prepares all the resources for a commit operation, and based on whether
- all resources are ready for a commit or not, issues a commit or rollback
+ <p>Once the application issues the commit request, the transaction manager
+ prepares all the resources for a commit operation, and based on whether
+ all resources are ready for a commit or not, issues a commit or rollback
request to all the resources.</p>
<p>Resource Manager responsibilities could be summarized as follow:</p>
<ul>
<li>Establish and maintain transaction context </li>
- <li>Maintain association between a transaction and the participating
+ <li>Maintain association between a transaction and the participating
resources. </li>
- <li>Initiate and conduct two-phase commit and recovery protocol with the
+ <li>Initiate and conduct two-phase commit and recovery protocol with the
resource managers. </li>
- <li>Make synchronization calls to the application components before
+ <li>Make synchronization calls to the application components before
beginning and after end of the two-phase commit and recovery process
</li>
</ul>
</div>
<h5>Local vs. Distributed Transaction</h5>
<p>
- A transaction that involves only one transactional resource, such a database,
- is considered as <i>local transaction</i>, while a transaction that involves
- more than one transactional resource that need to be coordinated to reach a
+ A transaction that involves only one transactional resource, such a database,
+ is considered as <i>local transaction</i>, while a transaction that involves
+ more than one transactional resource that need to be coordinated to reach a
consistent state is considered as a <i>distributed transaction.</i>
</p>
- <p>A transaction can be specified by what is known as transaction demarcation.
- Transaction demarcation enables work done by distributed components to be
- bound by a global transaction. It is a way of marking groups of operations to
+ <p>A transaction can be specified by what is known as transaction demarcation.
+ Transaction demarcation enables work done by distributed components to be
+ bound by a global transaction. It is a way of marking groups of operations to
constitute a transaction. </p>
- <p>The most common approach to demarcation is to mark the thread executing the
- operations for transaction processing. This is called as programmatic
- demarcation. The transaction so established can be suspended by unmarking the
- thread, and be resumed later by explicitly propagating the transaction context
+ <p>The most common approach to demarcation is to mark the thread executing the
+ operations for transaction processing. This is called as programmatic
+ demarcation. The transaction so established can be suspended by unmarking the
+ thread, and be resumed later by explicitly propagating the transaction context
from the point of suspension to the point of resumption. </p>
- <p>The transaction demarcation ends after a commit or a rollback request to
- the transaction manager. The commit request directs all the participating
- resources managers to record the effects of the operations of the transaction
- permanently. The rollback request makes the resource managers undo the effects
+ <p>The transaction demarcation ends after a commit or a rollback request to
+ the transaction manager. The commit request directs all the participating
+ resources managers to record the effects of the operations of the transaction
+ permanently. The rollback request makes the resource managers undo the effects
of all operations on the transaction. </p>
<h5>Transaction Context and Propagation </h5>
- <p>Since multiple application components and resources participate in a
- transaction, it is necessary for the transaction manager to establish and
- maintain the state of the transaction as it occurs. This is usually done in
+ <p>Since multiple application components and resources participate in a
+ transaction, it is necessary for the transaction manager to establish and
+ maintain the state of the transaction as it occurs. This is usually done in
the form of transaction context. </p>
- <p>Transaction context is an association between the transactional operations
- on the resources, and the components invoking the operations. During the
- course of a transaction, all the threads participating in the transaction
- share the transaction context. Thus the transaction context logically envelops
- all the operations performed on transactional resources during a transaction.
- The transaction context is usually maintained transparently by the underlying
+ <p>Transaction context is an association between the transactional operations
+ on the resources, and the components invoking the operations. During the
+ course of a transaction, all the threads participating in the transaction
+ share the transaction context. Thus the transaction context logically envelops
+ all the operations performed on transactional resources during a transaction.
+ The transaction context is usually maintained transparently by the underlying
transaction manager. </p>
<h5>Resource Enlistment</h5>
- <p>Resource enlistment is the process by which resource managers inform the
- transaction manager of their participation in a transaction. This process
- enables the transaction manager to keep track of all the resources
- participating in a transaction. The transaction manager uses this information
- to coordinate transactional work performed by the resource managers and to
- drive two-phase and recovery protocol. At the end of a transaction (after a
+ <p>Resource enlistment is the process by which resource managers inform the
+ transaction manager of their participation in a transaction. This process
+ enables the transaction manager to keep track of all the resources
+ participating in a transaction. The transaction manager uses this information
+ to coordinate transactional work performed by the resource managers and to
+ drive two-phase and recovery protocol. At the end of a transaction (after a
commit or rollback) the transaction manager delists the resources. </p>
<h5>
<a name="2pc"/>Two-Phase Commit</h5>
- <p>This protocol between the transaction manager and all the resources
- enlisted for a transaction ensures that either all the resource managers
- commit the transaction or they all abort. In this protocol, when the
- application requests for committing the transaction, the transaction manager
- issues a prepare request to all the resource managers involved. Each of these
- resources may in turn send a reply indicating whether it is ready for commit
- or not. Only The transaction manager issue a commit request to all the
- resource managers, only when all the resource managers are ready for a commit.
- Otherwise, the transaction manager issues a rollback request and the
+ <p>This protocol between the transaction manager and all the resources
+ enlisted for a transaction ensures that either all the resource managers
+ commit the transaction or they all abort. In this protocol, when the
+ application requests for committing the transaction, the transaction manager
+ issues a prepare request to all the resource managers involved. Each of these
+ resources may in turn send a reply indicating whether it is ready for commit
+ or not. Only The transaction manager issue a commit request to all the
+ resource managers, only when all the resource managers are ready for a commit.
+ Otherwise, the transaction manager issues a rollback request and the
transaction will be rolled back. </p>
<h5>
<a name="RecoveryLog"/>Recovery and Logging</h5>
<div>
- Basically, the Recovery is the mechanism which preserves the transaction atomicity in presence of failures.
- The basic technique for implementing transactions in presence of failures is based on the use of logs. That is, a transaction system has to record enough information to ensure that
- it can be able to return to a previous state in case of failure or to ensure that changes committed by a transaction are properly stored.
+ Basically, the Recovery is the mechanism which preserves the transaction atomicity in presence of failures.
+ The basic technique for implementing transactions in presence of failures is based on the use of logs. That is, a transaction system has to record enough information to ensure that
+ it can be able to return to a previous state in case of failure or to ensure that changes committed by a transaction are properly stored.
<p>
- In addition to be able to store appropriate information, all participants within a distributed transaction must log similar information which allow
+ In addition to be able to store appropriate information, all participants within a distributed transaction must log similar information which allow
them to take a same decision either to set data in their final state or in their initial state. </p>
- <p> Two techniques are in general used to ensure transaction's atomicity. A first technique focuses on manipulated data, such the Do/Undo/Redo protocol
- (considered as a recovery mechanism in a centralized system), which allow a participant to set its data in their final values or to
- retrieve them in their initial values. A second technique relies on a distributed protocol named the two phases commit,
- ensuring that all participants involved within a distributed transaction set their data either in their final values or in their initial values.
+ <p> Two techniques are in general used to ensure transaction's atomicity. A first technique focuses on manipulated data, such the Do/Undo/Redo protocol
+ (considered as a recovery mechanism in a centralized system), which allow a participant to set its data in their final values or to
+ retrieve them in their initial values. A second technique relies on a distributed protocol named the two phases commit,
+ ensuring that all participants involved within a distributed transaction set their data either in their final values or in their initial values.
In other words all participants must commit or all must rollback. </p>
<img border="0" src="includes/recovery_logs.GIF"/>
<p/>
<p>
- In addition to failures we refer as centralized such system crashes,
- communication failures due for instance to <span style="mso-spacerun:yes"/>network outages or message loss have to be considered during
- the recovery process of a distributed transaction.
+ In addition to failures we refer as centralized such system crashes,
+ communication failures due for instance to <span style="mso-spacerun:yes"/>network outages or message loss have to be considered during
+ the recovery process of a distributed transaction.
</p>
<p>
- In order to provide an efficient and optimized mechanism to deal with
- failure, modern transactional systems typically adopt a “presume
- abort” strategy, which simplifies the transaction management.
+ In order to provide an efficient and optimized mechanism to deal with
+ failure, modern transactional systems typically adopt a “presume
+ abort” strategy, which simplifies the transaction management.
</p>
<p>
- The presumed abort strategy can be stated as «when in doubt, abort».
- With this strategy, when the recovery mechanism has no information
- about the transaction, it presumes that the transaction has been
+ The presumed abort strategy can be stated as «when in doubt, abort».
+ With this strategy, when the recovery mechanism has no information
+ about the transaction, it presumes that the transaction has been
aborted. </p>
-
- A particularity of the presumed-abort assumption allows a coordinator
- to not log anything before the commit decision and the participants do
- not to log anything before they prepare. Then, any failure which
- occurs before the 2pc starts lead to abort the transaction.
- Furthermore, from a coordinator point of view any communication
- failure detected by a timeout or exception raised on sending prepare
+
+ A particularity of the presumed-abort assumption allows a coordinator
+ to not log anything before the commit decision and the participants do
+ not to log anything before they prepare. Then, any failure which
+ occurs before the 2pc starts lead to abort the transaction.
+ Furthermore, from a coordinator point of view any communication
+ failure detected by a timeout or exception raised on sending prepare
is considered as a negative vote which leads to abort the transaction.
-
-
- So, within a distributed transaction a coordinator or a participant
- may fail in two ways: either it crashes or it times out for a message
- it was expecting. When a coordinator or a participant crashes and
- then restarts, it uses information on stable storage to determine the
- way to perform the recovery. As we will see it the presumed-abort
+
+
+ So, within a distributed transaction a coordinator or a participant
+ may fail in two ways: either it crashes or it times out for a message
+ it was expecting. When a coordinator or a participant crashes and
+ then restarts, it uses information on stable storage to determine the
+ way to perform the recovery. As we will see it the presumed-abort
strategy enable an optimized behavior for the recovery.
</div>
- <h5>Heuristic Decision</h5>
-
- In extremely rare cases, a resource manager may choose not to wait for
- the outcome from the transaction manager. This might occur if the
- communications path was lost and was not likely to be restored for a
- very long time. Typically this
- happens as a result of human intervention and not as an arbitrary
- action of a resource manager.
-
- In order to release locks and make this transactions data available to
- new transactions, the resource manager makes a <b>heuristic decision</b>,
- i.e. it guesses the proper transaction outcome. When it does so, it
- must remember its guess until contact with the transaction manager is
+ <h5>Heuristic Decision</h5>
+
+ In extremely rare cases, a resource manager may choose not to wait for
+ the outcome from the transaction manager. This might occur if the
+ communications path was lost and was not likely to be restored for a
+ very long time. Typically this
+ happens as a result of human intervention and not as an arbitrary
+ action of a resource manager.
+
+ In order to release locks and make this transactions data available to
+ new transactions, the resource manager makes a <b>heuristic decision</b>,
+ i.e. it guesses the proper transaction outcome. When it does so, it
+ must remember its guess until contact with the transaction manager is
ultimately re-established.
-
+
<h4>Standards</h4>
- Saying that a distributed transaction can involve several distributed
- participants, means that these participant must be integrated within a
- global transaction manager which has the responsibility to ensure that all
- participants take a common decision to commit or rollback the distributed
- transaction. The key of such integration is the existence of a common
- transactional interface which is understood by all participants,
- transaction manager and resource managers such databases.
+ Saying that a distributed transaction can involve several distributed
+ participants, means that these participant must be integrated within a
+ global transaction manager which has the responsibility to ensure that all
+ participants take a common decision to commit or rollback the distributed
+ transaction. The key of such integration is the existence of a common
+ transactional interface which is understood by all participants,
+ transaction manager and resource managers such databases.
<p>
- The importance of common interfaces between participants, as well as the
- complexity of their implementation, becomes obvious in an open systems
- environment. For this aim various distributed transaction processing
- standards have been developed by international standards organizations.
- Among these organizations, We list three of them which are mainly
+ The importance of common interfaces between participants, as well as the
+ complexity of their implementation, becomes obvious in an open systems
+ environment. For this aim various distributed transaction processing
+ standards have been developed by international standards organizations.
+ Among these organizations, We list three of them which are mainly
considered in the JBoss Transaction Service product: </p>
<ul>
<li>
The <a class="linkscoloured" href="xopen_overview.html">X/Open model </a> and its successful XA interface
</li>
<li>
- The OMG with its CORBA infrastructure and the <a class="linkscoloured" href="ots_overview.html">Object
+ The OMG with its CORBA infrastructure and the <a class="linkscoloured" href="ots_overview.html">Object
Transaction Service</a> and finally
</li>
<li>
@@ -346,17 +346,17 @@
JTA/JTS specification</a>
</li>
</ul>
- Basically these standards have proposed logical models, which divide
- transaction processing into several functions:
+ Basically these standards have proposed logical models, which divide
+ transaction processing into several functions:
<ul>
<li>
those assigned to the application which ties resources together in application- specific operations
</li>
<li>
- those assigned to the Resource manager which access physically to data stores
+ those assigned to the Resource manager which access physically to data stores
</li>
<li>
- functions performed by the Transaction Manager which manages transactions, and finally
+ functions performed by the Transaction Manager which manages transactions, and finally
</li>
<li>
Communication Resource Managers which allow to exchange information with other transactional domains.
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/EJB_Transactions.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/EJB_Transactions.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/EJB_Transactions.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Managing Transaction in EJB" rootpath="../..">
+<page title="JBossTS Trail map: Managing Transaction in EJB" rootpath="../..">
<header>
Trail map: Managing Transactions in EJB
</header>
@@ -57,23 +57,23 @@
</br>
<br>
Figure 4 - EJB and Transactions</br>
- <p>An enterprise bean is specified by two interfaces: the home interface and the
- remote interface. The home interface specifies how a bean can created or found.
- With the help of this interface, a client or another bean can obtain a reference
- to a bean residing in a container on an EJB server. The remote interface specifies
+ <p>An enterprise bean is specified by two interfaces: the home interface and the
+ remote interface. The home interface specifies how a bean can created or found.
+ With the help of this interface, a client or another bean can obtain a reference
+ to a bean residing in a container on an EJB server. The remote interface specifies
application specific methods that are relevant to entity or session beans.<br>
- Clients obtain references to home interfaces of enterprise beans via the Java
- Naming and Directory Interface (JNDI) mechanism. An EJB server should provide
- a JNDI implementation for any naming and directory server. Using this reference
- to the home interface, a client can obtain a reference to the remote interface.
- The client can then access methods specified in the remote interface. The EJB
- specification specifies the Java Remote Method Invocation (RMI) as the application
- level protocol for remote method invocation. However, an implementation can
+ Clients obtain references to home interfaces of enterprise beans via the Java
+ Naming and Directory Interface (JNDI) mechanism. An EJB server should provide
+ a JNDI implementation for any naming and directory server. Using this reference
+ to the home interface, a client can obtain a reference to the remote interface.
+ The client can then access methods specified in the remote interface. The EJB
+ specification specifies the Java Remote Method Invocation (RMI) as the application
+ level protocol for remote method invocation. However, an implementation can
use IIOP as the wire-level protocol.</br>
<br>
- In Figure 5, the client first obtains a reference to the home interface, and
- then a reference to an instance of Bean A via the home interface. The same procedure
- is applicable for instance of Bean A to obtain a reference and invoke methods
+ In Figure 5, the client first obtains a reference to the home interface, and
+ then a reference to an instance of Bean A via the home interface. The same procedure
+ is applicable for instance of Bean A to obtain a reference and invoke methods
on an instance of Bean B.</br>
</p>
<h4>EJB Transaction Model</h4>
@@ -83,8 +83,8 @@
be exposed to enterprise beans. This interface is required for programmatic
transaction demarcation as discussed in the next section.
<br>
-The EJB framework allows both programmatic and declarative demarcation of transactions.
-Declarative demarcation is needed for all enterprise beans deployed on the EJB.
+The EJB framework allows both programmatic and declarative demarcation of transactions.
+Declarative demarcation is needed for all enterprise beans deployed on the EJB.
In addition, EJB clients can also initiative and end transactions programmatically.</br>
<br>
The container performs automatic demarcation depending on the transaction
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_Configuration.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_Configuration.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_Configuration.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="JBoss (a Division of Redhat): Trail map: Configuring the JBoss Transaction Service" rootpath="../..">
+<page title="JBossTS Trail map: Configuring the JBoss Transaction Service" rootpath="../..">
<header>
Trail map: JBossTS Configuration
</header>
@@ -42,8 +42,8 @@
arguments, it is more convenient to organise and initialise them through properties
files. </p>
<h4>Properties File</h4>
-<p> The properties file named <font face="Courier New, Courier, mono">arjunajts-properties.xml
- </font> and located under the <font face="Courier New, Courier, mono"><ats_installation_directory>/etc</font>
+<p> The properties file named <font face="Courier New, Courier, mono">arjunajts-properties.xml
+ </font> and located under the <font face="Courier New, Courier, mono"><ats_installation_directory>/etc</font>
directory is organised as a collection of property names. </p>
<blockquote>
<pre>
@@ -92,7 +92,7 @@
<b>Default Value</b>
</td>
</tr>
-
+
<tr>
<td>com.arjuna.ats.arjuna.<br/>objectstore.localOSRoot</td>
<td>By default, all object states will be stored within the "defaultStore"
@@ -117,22 +117,22 @@
</tr>
</table>
<h4>ObjectStore management</h4>
-The JBossTS layer requires an object store for transaction management <a class="linkscoloured" href="DTP.html#RecoveryLog">logs</a>. Within
-the transaction service installation, object store is updated regularly whenever
-transactions are created, or when Transactional Objects for Java is used. In a
-failure free environment, the only object states which should reside within the
-object store are those representing objects created with the Transactional Objects
-for Java API. However, if failures occur, transaction logs may remain in the object
-store until crash recovery facilities have resolved the transactions they represent.
-As such it is very important that the contents of the object store are not deleted
-without due care and attention, as this will make it impossible to resolve in
-doubt transactions. In addition, if multiple users share the same object store
-it is important that they realise this and do not simply delete the contents of
-the object store assuming it is an exclusive resource.
-<p> The location of the ObjectStore is specified in via the properrty <font face="Courier New,Courier">com.arjuna.ats.arjuna.objectstore.objectStoreDir</font>
- that can be passed with the java flag "-D". For convenience this property
- is defined in the properties file arjuna-properties.xml, and its value is set
- during the JBossTS installation. At any time, the location of the ObjectStore
+The JBossTS layer requires an object store for transaction management <a class="linkscoloured" href="DTP.html#RecoveryLog">logs</a>. Within
+the transaction service installation, object store is updated regularly whenever
+transactions are created, or when Transactional Objects for Java is used. In a
+failure free environment, the only object states which should reside within the
+object store are those representing objects created with the Transactional Objects
+for Java API. However, if failures occur, transaction logs may remain in the object
+store until crash recovery facilities have resolved the transactions they represent.
+As such it is very important that the contents of the object store are not deleted
+without due care and attention, as this will make it impossible to resolve in
+doubt transactions. In addition, if multiple users share the same object store
+it is important that they realise this and do not simply delete the contents of
+the object store assuming it is an exclusive resource.
+<p> The location of the ObjectStore is specified in via the properrty <font face="Courier New,Courier">com.arjuna.ats.arjuna.objectstore.objectStoreDir</font>
+ that can be passed with the java flag "-D". For convenience this property
+ is defined in the properties file arjuna-properties.xml, and its value is set
+ during the JBossTS installation. At any time, the location of the ObjectStore
may be changed.</p>
<h4>Configuring Output</h4>
<p>Sometimes it is desirable, mainly in case of debugging, to have some form of
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_ORBPortability.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_ORBPortability.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_ORBPortability.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="JBoss (a Division of Redhat): Trail map: ORB Portability" rootpath="../..">
+<page title="JBossTS Trail map: ORB Portability" rootpath="../..">
<header> Trail map: ORB Portability </header>
<content>
<navigation>
@@ -34,29 +34,29 @@
<area title="ORB Portability">
<html>
<h4>Introduction</h4>
- <p>Many ORBs currently in use support different versions of CORBA and/or the Java
+ <p>Many ORBs currently in use support different versions of CORBA and/or the Java
language mapping.<br>
- The JBoss Transaction Service only supports the new Portable Object Adapter
- (POA) architecture described in the CORBA 2.3 specification as a replacement
- for the Basic Object Adapter (BOA). Unlike the BOA, which was weakly specified
- and led to a number of different (and often conflicting) implementations, the
- POA was deliberately designed to reduce the differences between ORB implementations,
- and thus minimise the amount of re-coding that would need to be done when porting
- applications from one ORB to another. However, there is still scope for slight
- differences between ORB implementations, notably in the area of threading. Note,
+ The JBoss Transaction Service only supports the new Portable Object Adapter
+ (POA) architecture described in the CORBA 2.3 specification as a replacement
+ for the Basic Object Adapter (BOA). Unlike the BOA, which was weakly specified
+ and led to a number of different (and often conflicting) implementations, the
+ POA was deliberately designed to reduce the differences between ORB implementations,
+ and thus minimise the amount of re-coding that would need to be done when porting
+ applications from one ORB to another. However, there is still scope for slight
+ differences between ORB implementations, notably in the area of threading. Note,
instead of talking about the POA, this manual will consider the Object Adapter</br>
(OA).</p>
- <p>Because the Arjuna Transaction Service must be able to run on a number of different
- ORBs, we have developed an ORB portability interface which allows entire applications
- to be moved between ORBs with little or no modifications. This portability interface
- is available to the application programmer in the form of several Java classes.
+ <p>Because the Arjuna Transaction Service must be able to run on a number of different
+ ORBs, we have developed an ORB portability interface which allows entire applications
+ to be moved between ORBs with little or no modifications. This portability interface
+ is available to the application programmer in the form of several Java classes.
</p>
<h4>The ORB Portability API</h4>
<h5>Using the ORB </h5>
- <p>The ORB class provided in the package com.arjuna.orbportability.ORB shown below
- provides a uniform way of using the ORB. There are methods for obtaining a reference
- to the ORB, and for placing the application into a mode where it listens for
- incoming connections. There are also methods for registering application specific
+ <p>The ORB class provided in the package com.arjuna.orbportability.ORB shown below
+ provides a uniform way of using the ORB. There are methods for obtaining a reference
+ to the ORB, and for placing the application into a mode where it listens for
+ incoming connections. There are also methods for registering application specific
classes to be invoked before or after ORB initialisation. </p>
<pre>
public class ORB
@@ -65,61 +65,61 @@
// given the various parameters,this method initialises the ORB and
// retains a reference to it within the ORB class.
public synchronized void initORB () throws SystemException;
- public synchronized void initORB (Applet a, Properties p)
+ public synchronized void initORB (Applet a, Properties p)
throws SystemException;
- public synchronized void initORB (String[] s, Properties p)
+ public synchronized void initORB (String[] s, Properties p)
throws SystemException;
-
- //The orb method returns a reference to the ORB.
+
+ //The orb method returns a reference to the ORB.
//After shutdown is called this reference may be null.
public synchronized org.omg.CORBA.ORB orb ();
public synchronized boolean setOrb (org.omg.CORBA.ORB theORB);
- // If supported, this method cleanly shuts down the ORB.
- // Any pre- and post- ORB shutdown classes which
- //have been registered will also be called.
+ // If supported, this method cleanly shuts down the ORB.
+ // Any pre- and post- ORB shutdown classes which
+ //have been registered will also be called.
public synchronized void shutdown ();
-
+
public synchronized boolean addAttribute (Attribute p);
public synchronized void addPreShutdown (PreShutdown c);
public synchronized void addPostShutdown (PostShutdown c);
-
+
public synchronized void destroy () throws SystemException;
- //these methods place the ORB into a listening mode,
+ //these methods place the ORB into a listening mode,
//where it waits for incoming invocations.
public void run ();
public void run (String name);
};
</pre>
- <p>Note, some of the methods are not supported on all ORBs, and in this situation,
- a suitable exception will be thrown. The ORB class is a factory class which
- has no public constructor. To create an instance of an ORB you must call the
- getInstance method passing a unique name as a parameter. If this unique name
- has not been passed in a previous call to getInstance you will be returned a
- new ORB instance. Two invocations of getInstance made with the same unique name,
+ <p>Note, some of the methods are not supported on all ORBs, and in this situation,
+ a suitable exception will be thrown. The ORB class is a factory class which
+ has no public constructor. To create an instance of an ORB you must call the
+ getInstance method passing a unique name as a parameter. If this unique name
+ has not been passed in a previous call to getInstance you will be returned a
+ new ORB instance. Two invocations of getInstance made with the same unique name,
within the same JVM, will return the same ORB instance. </p>
<h5>Using the Object Adapater (OA)</h5>
- <p>The OA classes shown below provide a uniform way of using Object Adapters (OA).
- There are methods for obtaining a reference to the OA. There are also methods
- for registering application specific classes to be invoked before or after OA
- initialisation. Note, some of the methods are not supported on all ORBs, and
- in this situation, a suitable exception will be thrown. The OA class is an abstract
- class and provides the basic interface to an Object Adapter. It has two sub-classes
- RootOA and ChildOA, these classes expose the interfaces specific to the root
- Object Adapter and a child Object Adapter respectively. From the RootOA you
- can obtain a reference to the RootOA for a given ORB by using the static method
+ <p>The OA classes shown below provide a uniform way of using Object Adapters (OA).
+ There are methods for obtaining a reference to the OA. There are also methods
+ for registering application specific classes to be invoked before or after OA
+ initialisation. Note, some of the methods are not supported on all ORBs, and
+ in this situation, a suitable exception will be thrown. The OA class is an abstract
+ class and provides the basic interface to an Object Adapter. It has two sub-classes
+ RootOA and ChildOA, these classes expose the interfaces specific to the root
+ Object Adapter and a child Object Adapter respectively. From the RootOA you
+ can obtain a reference to the RootOA for a given ORB by using the static method
getRootOA. To create a ChildOA instance use the createPOA method on the RootOA.</p>
- <p>As described below, the OA class and its sub-classes provide most operations
+ <p>As described below, the OA class and its sub-classes provide most operations
provided by the POA as specified in the POA specification. </p>
<pre>
public abstract class OA
-{
+{
public synchronized static RootOA getRootOA(ORB associatedORB);
public synchronized void initPOA () throws SystemException;
public synchronized void initPOA (String[] args) throws SystemException;
public synchronized void initOA () throws SystemException;
public synchronized void initOA (String[] args) throws SystemException;
- public synchronized ChildOA createPOA (String adapterName,
- PolicyList policies) throws AdapterAlreadyExists, InvalidPolicy;
+ public synchronized ChildOA createPOA (String adapterName,
+ PolicyList policies) throws AdapterAlreadyExists, InvalidPolicy;
public synchronized org.omg.PortableServer.POA rootPoa ();
public synchronized boolean setPoa (org.omg.PortableServer.POA thePOA);
public synchronized org.omg.PortableServer.POA poa (String adapterName);
@@ -129,7 +129,7 @@
};
public class RootOA extends OA
-{
+{
public synchronized void destroy() throws SystemException;
public org.omg.CORBA.Object corbaReference (Servant obj);
public boolean objectIsReady (Servant obj, byte[] id);
@@ -139,11 +139,11 @@
};
public class ChildOA extends OA
-{
+{
public synchronized boolean setRootPoa (POA thePOA);
public synchronized void destroy() throws SystemException;
public org.omg.CORBA.Object corbaReference (Servant obj);
- public boolean objectIsReady (Servant obj, byte[] id)
+ public boolean objectIsReady (Servant obj, byte[] id)
throws SystemException;
public boolean objectIsReady (Servant obj) throws SystemException;
public boolean shutdownObject (org.omg.CORBA.Object obj);
@@ -151,7 +151,7 @@
};
</pre>
<h5>Example</h5>
- <p>The following example illustrates how to use the ORB Portability API to create
+ <p>The following example illustrates how to use the ORB Portability API to create
</p>
<pre>
import com.arjuna.orbportability.ORB;
@@ -174,18 +174,18 @@
};
</pre>
<h5>Specifying the ORB to use</h5>
- <p> If using such a JDK (from its version 1.2.2) in conjunction with another ORB
- it is necessary to tell the JVM which ORB to use. This happens by specifying
- the <font face="Courier New, Courier, mono">org.omg.CORBA.ORBClass</font> and
- <font face="Courier New, Courier, mono">org.omg.CORBA.ORBSingletonClass properties</font>.
- If used, ORB Portability classes will ensure that these properties are automatically
+ <p> If using such a JDK (from its version 1.2.2) in conjunction with another ORB
+ it is necessary to tell the JVM which ORB to use. This happens by specifying
+ the <font face="Courier New, Courier, mono">org.omg.CORBA.ORBClass</font> and
+ <font face="Courier New, Courier, mono">org.omg.CORBA.ORBSingletonClass properties</font>.
+ If used, ORB Portability classes will ensure that these properties are automatically
set when required, i.e., during ORB initialisation. </p>
- <p>The ORB portability library attempts to detect which ORB is in use, it does
- this by looking for the ORB implementation class for each ORB it supports. This
- means that if there are classes for more than one ORB in the classpath the wrong
- ORB can be detected. Therefore it is best to only have one ORB in your classpath.
- If it is necessary to have multiple ORBs in the classpath then the property
- <font face="Courier New, Courier, mono">com.hp.mw.orbportability.orbImplementation</font>
+ <p>The ORB portability library attempts to detect which ORB is in use, it does
+ this by looking for the ORB implementation class for each ORB it supports. This
+ means that if there are classes for more than one ORB in the classpath the wrong
+ ORB can be detected. Therefore it is best to only have one ORB in your classpath.
+ If it is necessary to have multiple ORBs in the classpath then the property
+ <font face="Courier New, Courier, mono">com.hp.mw.orbportability.orbImplementation</font>
must be set to the value specified in the table below.</p>
<table width="75%" border="1">
<tr bgcolor="#8BD5FC">
@@ -209,7 +209,7 @@
<td>com.arjuna.orbportability.internal.orbspecific.jacorb.orb.implementations.jacorb_2_0</td>
</tr>
</table>
- <p>For additional details on the features provided by the ORB Portability API
+ <p>For additional details on the features provided by the ORB Portability API
refer to the documentation provided by the JBossTS distribution.</p>
<p/>
</html>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_Recovery.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_Recovery.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JBossTS_Recovery.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="JBoss (a Division of Redhat): Trail map: JBossTS Failure Recovery" rootpath="../..">
+<page title="JBossTS Trail map: Failure Recovery" rootpath="../..">
<header>
Trail map: JBossTS - Failure Recovery
</header>
@@ -88,7 +88,7 @@
On initialization the Recovery Manager first loads in configuration information
via a properties file. This configuration includes a number of recovery
activators and recovery modules, which are then dynamically loaded.
-<br>Each recovery activator, which implements the
+<br>Each recovery activator, which implements the
<font face="Courier New,Courier">com.arjuna.ats.arjuna.recovery.RecoveryActivator</font>
interface, is used to instantiate a recovery class related to the underlying
communication protocol. Indeed, since the version 3.0 of JBossTS, the
@@ -99,17 +99,17 @@
has the responsibility to create a RecoveryCoordinator object able to respond
to the replay_completion operation.</br>
<br>
-All RecoveryActivator instances inherit the same interface. They are loaded via
+All RecoveryActivator instances inherit the same interface. They are loaded via
the following recovery extension property:
</br>
<pre>
-<property
- name="com.arjuna.ats.arjuna.recovery.recoveryActivator_<number>"
+<property
+ name="com.arjuna.ats.arjuna.recovery.recoveryActivator_<number>"
value="RecoveryClass"/>
</pre>
<p>For instance the RecoveryActivator provided in the distribution of JTS/OTS, which shall not be commented, is as follow : </p>
<pre>
-<property
+<property
name="com.arjuna.ats.arjuna.recovery.recoveryActivator_1"
value="com.arjuna.ats.internal.jts.
orbspecific.recovery.RecoveryEnablement"/>
@@ -135,10 +135,10 @@
The default RecoveryExtension settings are:
<pre>
-<property name="com.arjuna.ats.arjuna.recovery.recoveryExtension1"
+<property name="com.arjuna.ats.arjuna.recovery.recoveryExtension1"
value="com.arjuna.ats.internal.
arjuna.recovery.AtomicActionRecoveryModule"/>
-<property name="com.arjuna.ats.arjuna.recovery.recoveryExtension2"
+<property name="com.arjuna.ats.arjuna.recovery.recoveryExtension2"
value="com.arjuna.ats.internal.
txoj.recovery.TORecoveryModule"/>
<property name="com.arjuna.ats.arjuna.recovery.recoveryExtension3"
@@ -178,8 +178,8 @@
value="com.arjuna.ats.internal.arjuna.recovery.
ExpiredTransactionStatusManagerScanner"/>
</pre>
- <p>The following table summarize properties used by the Recovery Manager. These
- properties are defined by default the properties file named RecoveryManager-properties.xml.
+ <p>The following table summarize properties used by the Recovery Manager. These
+ properties are defined by default the properties file named RecoveryManager-properties.xml.
</p>
<table BORDER="" WIDTH="100%">
<tr ALIGN="CENTER" BGCOLOR="#66FFFF">
@@ -232,7 +232,7 @@
recovery.recoveryExtensionX</font>
</td>
<td>
- <font size="-7">Indicates a periodic recovery module to use. X is the occurence number
+ <font size="-7">Indicates a periodic recovery module to use. X is the occurence number
of the recovery module among a set of recovery modules. These modules are
invoked in sort-order of names</font>
</td>
@@ -249,14 +249,14 @@
recovery.recoveryActivator_X</font>
</td>
<td>
- <font size="-7">Indicates a recovery activator to use. X is the occurence number of the
+ <font size="-7">Indicates a recovery activator to use. X is the occurence number of the
recovery activator among a set of recovery activators. </font>
</td>
<td>
<font size="-7">The class name of the periodic recovery activator</font>
</td>
<td>
- <font size="-7">JBossTS provide one class that manages the recovery protocol specified
+ <font size="-7">JBossTS provide one class that manages the recovery protocol specified
by the OTS specification </font>
</td>
</tr>
@@ -266,7 +266,7 @@
recovery.expiryScannerXXX</font>
</td>
<td>
- <font size="-7">Expiry scanners to use (order of invocation is random). Names must begin
+ <font size="-7">Expiry scanners to use (order of invocation is random). Names must begin
with "com.arjuna.ats.arjuna.<br/>recovery.expiryScanner"</font>
</td>
<td>
@@ -282,9 +282,9 @@
recovery.expiryScanInterval</font>
</td>
<td>
- <font size="-7">Interval, in hours, between running the expiry scanners. This can be
- quite long. The absolute value determines the interval - if the value is
- negative, the scan will NOT be run until after one interval has elapsed.
+ <font size="-7">Interval, in hours, between running the expiry scanners. This can be
+ quite long. The absolute value determines the interval - if the value is
+ negative, the scan will NOT be run until after one interval has elapsed.
If positive the first scan will be immediately
after startup. Zero will prevent any scanning. </font>
</td>
@@ -301,8 +301,8 @@
transactionStatusManagerExpiryTime</font>
</td>
<td>
- <font size="-7">Age, in hours, for removal of transaction status manager item. This should
- be longer than any ts-using process will remain running. Zero = Never removed.
+ <font size="-7">Age, in hours, for removal of transaction status manager item. This should
+ be longer than any ts-using process will remain running. Zero = Never removed.
</font>
</td>
<td>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JDBC_Transactions.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JDBC_Transactions.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JDBC_Transactions.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Managing Transaction in J2EE" rootpath="../..">
+<page title="JBossTS Trail map: Managing Transaction in Java EE" rootpath="../..">
<header>
Trail map: JDBC and Transactions
</header>
@@ -36,9 +36,9 @@
</navigation>
<area title="JDBC and Transactions">
<html>
- <p> Java Data Base Connectivity, provide Java programs with a way to connect to
- and use relational databases. The JDBC API lets you invoke SQL commands from
- Java programming language methods. In simplest terms, JDBC allows to do three
+ <p> Java Data Base Connectivity, provide Java programs with a way to connect to
+ and use relational databases. The JDBC API lets you invoke SQL commands from
+ Java programming language methods. In simplest terms, JDBC allows to do three
things</p>
<ol>
<li>Establish a connection with a database </li>
@@ -54,22 +54,22 @@
while (rs.next()) {
int x = rs.getInt("a");
String s = rs.getString("b");
- float f = rs.getFloat("c");
+ float f = rs.getFloat("c");
}
</pre>
-<p>Before the version 2.0 of JDBC, only local transactions controlled by the transaction
- manager of the DBMS is possible. To code a JDBC transaction, you invoke the
- commit and rollback methods of the java.sql.Connection interface. The beginning
- of a transaction is implicit. A transaction begins with the first SQL statement
- that follows the most recent commit, rollback, or connect statement. (This rule
- is generally true, but may vary with DBMS vendor.). The following example illustrates
+<p>Before the version 2.0 of JDBC, only local transactions controlled by the transaction
+ manager of the DBMS is possible. To code a JDBC transaction, you invoke the
+ commit and rollback methods of the java.sql.Connection interface. The beginning
+ of a transaction is implicit. A transaction begins with the first SQL statement
+ that follows the most recent commit, rollback, or connect statement. (This rule
+ is generally true, but may vary with DBMS vendor.). The following example illustrates
how transactions are managed by the JDBC API.</p>
<pre>
public void withdraw (double amount) {
try {
- //A connection opened with JDBC is an AUTO COMMIT mode meaning
- // that the commitment is automatically performed when the connection
+ //A connection opened with JDBC is an AUTO COMMIT mode meaning
+ // that the commitment is automatically performed when the connection
// is closed
//setAutoCommit to false disable this feature
connection.setAutoCommit(false);
@@ -85,19 +85,19 @@
}
}</pre>
-<p>From the version 2.0, a JDBC driver can be involved within a distributed transaction
- since it supports the XAResource interface that allows to participate to the
- 2PC protocol. An application that need to include more than one database can
- create a JTA transaction. To demarcate a JTA transaction, the application program
- invokes the begin, commit, and rollback methods of the javax.transaction.UserTransaction
- interface. The following code, that can be applied to a bean-managed transaction,
- demonstrates the UserTransaction methods. The begin and commit invocations delimit
- the updates to the database. If the updates fail, the code invokes the rollback
+<p>From the version 2.0, a JDBC driver can be involved within a distributed transaction
+ since it supports the XAResource interface that allows to participate to the
+ 2PC protocol. An application that need to include more than one database can
+ create a JTA transaction. To demarcate a JTA transaction, the application program
+ invokes the begin, commit, and rollback methods of the javax.transaction.UserTransaction
+ interface. The following code, that can be applied to a bean-managed transaction,
+ demonstrates the UserTransaction methods. The begin and commit invocations delimit
+ the updates to the database. If the updates fail, the code invokes the rollback
method and throws an Exception. </p>
<pre>
public void transfer(double amount) {
UserTransaction ut = context.getUserTransaction();
-
+
try {
ut.begin();
// Perform SQL command to debit account 1
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JTA_Overview.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JTA_Overview.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/JTA_Overview.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,13 +16,13 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Managing Transaction in J2EE" rootpath="../..">
+<page title="JBossTS Trail map: Managing Transaction in Java EE" rootpath="../..">
<header>
- Trail map: Managing Transactions in J2EE
+ Trail map: Managing Transactions in Java EE
</header>
<content>
<navigation>
@@ -33,7 +33,7 @@
</links>
<links include="includes/trailmap_additional.xml"/>
</navigation>
- <area title="Managing Transactions in J2EE">
+ <area title="Managing Transactions in Java EE">
<html>
<h3> JTA/JTS Architecture</h3>
The Java transaction initiative consists of two specifications: Java Transaction Service (JTS) and Java Transaction API (JTA).
@@ -50,16 +50,16 @@
internally. This allows the JTA compliant applications to interoperate
with other OTS 1.1 complaint applications through the standard IIOP.</br>
<br>
-As shown in the Figure 1, in the Java transaction model, the Java application
-components can conduct transactional operations on JTA compliant resources via
-the JTS. The JTS acts as a layer over the OTS. The applications can therefore
-initiate global transactions to include other OTS transaction managers, or participate
+As shown in the Figure 1, in the Java transaction model, the Java application
+components can conduct transactional operations on JTA compliant resources via
+the JTS. The JTS acts as a layer over the OTS. The applications can therefore
+initiate global transactions to include other OTS transaction managers, or participate
in global transactions initiated by other OTS compliant transaction managers.</br>
<p>
<img SRC="includes/j2ee_1.GIF"/>
</p>
<blockquote>Figure 1 - The JTA/JTS transaction model</blockquote>
- <p>The Java Transaction Service is architected around an application server and
+ <p>The Java Transaction Service is architected around an application server and
a transaction manager. The architecture is shown in Figure 2. </p>
<p>
<img SRC="includes/j2ee_2.GIF"/>
@@ -119,7 +119,7 @@
<blockquote>Figure 3 - JTA Interfaces </blockquote>
<h4> Transaction Manager Interfaces</h4>
<ul>
- <li> javax.transaction.Status: Defines the following flags for the status of
+ <li> javax.transaction.Status: Defines the following flags for the status of
a transaction:</li>
</ul>
<table width="89%" border="1">
@@ -153,7 +153,7 @@
</tr>
<tr>
<td>STATUS_NO_TRANSACTION</td>
- <td>There is no transaction associated with the current Transaction, UserTransaction
+ <td>There is no transaction associated with the current Transaction, UserTransaction
or TransactionManager objects.</td>
</tr>
<tr>
@@ -166,7 +166,7 @@
</tr>
<tr>
<td>STATUS_ROLLEDBACK</td>
- <td>Outcome of the transaction has been determined as rollback. It is likely
+ <td>Outcome of the transaction has been determined as rollback. It is likely
that heuristics exists.</td>
</tr>
<tr>
@@ -175,14 +175,14 @@
</tr>
<tr>
<td>STATUS_UNKNOWN</td>
- <td>A transaction exists but its current status can not be determined. This
+ <td>A transaction exists but its current status can not be determined. This
is a transient condition</td>
</tr>
</table>
<blockquote>
<p>Table 1: Transaction Status Flags</p>
</blockquote>
-The javax.transaction.Transaction, javax.transaction.TransactionManager, and javax.transaction.UserTransaction
+The javax.transaction.Transaction, javax.transaction.TransactionManager, and javax.transaction.UserTransaction
interfaces provide a getStatus method that returns one of the above status flags.<br/>
<ul>
<li>
@@ -273,9 +273,9 @@
// End the transaction
userTransaction.commit();
</pre>
-<li> Application Server Controlled Demarcation In this approach, the javax.transaction.TransactionManager
- interface controls transaction demarcation on behalf of the application being
- managed. The transaction manager also maintains the transaction context and
+<li> Application Server Controlled Demarcation In this approach, the javax.transaction.TransactionManager
+ interface controls transaction demarcation on behalf of the application being
+ managed. The transaction manager also maintains the transaction context and
its association with the calling threads implicitly.</li>
<br/>Usage
<pre>
@@ -287,13 +287,13 @@
</pre>
</ol>
<h4>Resource Enlistment and Delistment</h4>
-Transactional resources such as database connections are typically managed by
-the application server in conjunction with some resource adapter and optionally
-with connection pooling optimisation. In order for an external transaction manager
-to co-ordinate transactional work performed by the resource managers, the application
-server must enlist and de-list the resources used in the transaction. These resources
-(participants) are enlisted with the transaction so that they can be informed
-when the transaction terminates, e.g., are driven through the two-phase commit
+Transactional resources such as database connections are typically managed by
+the application server in conjunction with some resource adapter and optionally
+with connection pooling optimisation. In order for an external transaction manager
+to co-ordinate transactional work performed by the resource managers, the application
+server must enlist and de-list the resources used in the transaction. These resources
+(participants) are enlisted with the transaction so that they can be informed
+when the transaction terminates, e.g., are driven through the two-phase commit
protocol. <br>
The JTA is much more closely integrated with the XA concept of resources
than the arbitrary objects. For each resource in-use by the application,
@@ -317,11 +317,11 @@
must be kept intact. The transaction manager passes the appropriate flag
value in its XAResource.end method call to the underlying resource manager.</br>
<br>
-The <a class="linkscoloured" href="EJB_Transactions.html">application server </a>can enlist and delist resource managers with the transaction
-manager using the <font face="Courier New,Courier">javax.transaction.Transaction</font>
+The <a class="linkscoloured" href="EJB_Transactions.html">application server </a>can enlist and delist resource managers with the transaction
+manager using the <font face="Courier New,Courier">javax.transaction.Transaction</font>
interface</br>
-Usage
- <p>Resource enlistment is in general done by the application server when an application
+Usage
+ <p>Resource enlistment is in general done by the application server when an application
requests it for a connection to a transactional resource.</p>
<pre>
// ... an implementation of the application server
Added: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/look_and_feel/JBoss_DivOfRH_RGB.gif
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/look_and_feel/JBoss_DivOfRH_RGB.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/look_and_feel/arjuna_logo.gif
===================================================================
(Binary files differ)
Deleted: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/look_and_feel/arjuna_logo_id.gif
===================================================================
(Binary files differ)
Deleted: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/images/look_and_feel/arjuna_strapline.gif
===================================================================
(Binary files differ)
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/ots_overview.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/ots_overview.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/ots_overview.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -19,7 +19,7 @@
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: The OMG OTS" rootpath="../..">
+<page title="JBossTS Trail map: The OMG OTS" rootpath="../..">
<header> Trail map: OMG Object Request Broker </header>
<content>
<navigation>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/trailmap_additional.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/trailmap_additional.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/trailmap_additional.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,7 +16,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
@@ -24,8 +24,8 @@
<link ref="DTP.html">Distributed Transaction Processing</link>
<link ref="xopen_overview.html">The X/Open DTP Model</link>
<link ref="ots_overview.html">The OMG OTS Model</link>
- <link ref="jta_overview.html">Transactions in J2EE</link>
- <link ref="JBossTS_Configuration.html">Configuring ATS</link>
+ <link ref="jta_overview.html">Transactions in Java EE</link>
+ <link ref="JBossTS_Configuration.html">Configuring JBossTS</link>
<link ref="JBossTS_Recovery.html">
Configuring the Recovery Manager
</link>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/www_arjuna_com_navigation.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/www_arjuna_com_navigation.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/includes/www_arjuna_com_navigation.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,19 +16,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
<links title="Trailmap">
- <abslink ref="http://www.arjuna.com/index.html" target="_blank">www.arjuna.com</abslink>
- <abslink ref="http://www.arjuna.com/news/index.html" target="_blank">news</abslink>
- <abslink ref="http://www.arjuna.com/company/index.html" target="_blank">company</abslink>
- <abslink ref="http://www.arjuna.com/products/index.html" target="_blank">products</abslink>
- <abslink ref="http://www.arjuna.com/standards/index.html" target="_blank">standards</abslink>
- <abslink ref="http://www.arjuna.com/research/index.html" target="_blank">research</abslink>
- <abslink ref="http://www.arjuna.com/library/index.html" target="_blank">library</abslink>
- <abslink ref="http://www.arjuna.com/forum/index.php" target="_blank">forums</abslink>
- <abslink ref="http://www.arjuna.com/contact/index.html" target="_blank">contact</abslink>
+ <abslink ref="http://www.jboss.org/" target="_blank">www.jboss.org</abslink>
+ <abslink ref="http://www.jboss.com/index.html?module=bb&op=viewforum&f=240" target="_blank">JBossTS forum</abslink>
</links>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/index.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/index.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/index.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Introduction" rootpath="../..">
+<page title="JBossTS Trail map: Introduction" rootpath="../..">
<header>
Trail map: Introduction
</header>
@@ -34,40 +34,40 @@
<links include="includes/trailmap_additional.xml"/>
</navigation>
<area title="Introduction">
- <html>
- <p>JBoss Transaction Service (JBossTS) assures complete, accurate business
- transactions for any Java based applications, including those written for the
- J2EE and EJB frameworks.</p>
- <p>JBossTS is a 100% Java implementation of a
- <a class="linkscoloured" href="DTP.html">distributed transaction management system</a>
- based on the Sun Microsystems J2EE Java Transaction Service (<a class="linkscoloured" href="jta_overview.html">JTS</a>) standard.
- Our implementation of the JTS utilizes the Object Management Group's (OMG) Object
- Transaction Service (<a class="linkscoloured" href="ots_overview.html">OTS</a>) model for transaction interoperability as recommended
- in the J2EE and EJB standards. Although any JTS-compliant product will allow
- Java objects to participate in transactions, one of the key features of ATS
- is it's 100% Java implementation. This allows ATS to support fully distributed
+ <html>
+ <p>JBoss Transaction Service (JBossTS) assures complete, accurate business
+ transactions for any Java based applications, including those written for the
+ Java EE and EJB frameworks.</p>
+ <p>JBossTS is a 100% Java implementation of a
+ <a class="linkscoloured" href="DTP.html">distributed transaction management system</a>
+ based on the Sun Microsystems Java EE Java Transaction Service (<a class="linkscoloured" href="jta_overview.html">JTS</a>) standard.
+ Our implementation of the JTS utilizes the Object Management Group's (OMG) Object
+ Transaction Service (<a class="linkscoloured" href="ots_overview.html">OTS</a>) model for transaction interoperability as recommended
+ in the Java EE and EJB standards. Although any JTS-compliant product will allow
+ Java objects to participate in transactions, one of the key features of JBossTS
+ is it's 100% Java implementation. This allows JBossTS to support fully distributed
transactions that can be coordinated by distributed parties.
-<p>JBossTS runs can be run both as an embedded distributed service of an application
- server (e.g., HPAS. JBoss), affording the user all the added benefits of the
- application server environment such as real-time load balancing, unlimited linear
- scalability and unmatched fault tolerance that allows you to deliver an always-on
- solution to your customers. It is also available as a free-standing Java Transaction
+<p>JBossTS runs can be run both as an embedded distributed service of an application
+ server (e.g. JBossAS), affording the user all the added benefits of the
+ application server environment such as real-time load balancing, unlimited linear
+ scalability and unmatched fault tolerance that allows you to deliver an always-on
+ solution to your customers. It is also available as a free-standing Java Transaction
Service.</p>
- <p>In addition to providing full compliance with the latest version of the JTS
-specification, ATS 4.0 leads the market in providing many advanced features such
+ <p>In addition to providing full compliance with the latest version of the JTS
+specification, JBossTS leads the market in providing many advanced features such
as fully distributed transactions and ORB portability with POA support.</p>
- <p>ATS 4.0 is supported on HP-UX 11i, Linux RedHat, Microsoft Windows NT 4.0,
- Microsoft Windows 2000, Microsoft Window XP, Sun Solaris 8 operating environments
+ <p>JBossTS is supported on HP-UX 11i, Linux RedHat, Microsoft Windows NT 4.0,
+ Microsoft Windows 2000, Microsoft Window XP, Sun Solaris 8 operating environments
and with any JDK 1.3 compliant environment.</p>
- <p>The Java Transaction API support for ATS comes in two flavours:</p>
+ <p>The Java Transaction API support for JBossTS comes in two flavours:</p>
<ul>
- <li>a purely local implementation, that does not require an ORB, but obviously
+ <li>a purely local implementation, that does not require an ORB, but obviously
requires all coordinated resources to reside within the same JVM. </li>
<li>a fully distributed implementation. </li>
</ul>
<h4>Key features</h4>
<ul>
- <li>full compliant with the JTA 1.0.1 specification:
+ <li>full compliant with the JTA 1.0.1 specification:
<ul>
<li>Purely local (ORB-less) JTA offers the fastest JTA performance </li>
<li>JDBC 2.0 support </li>
@@ -76,20 +76,20 @@
<li>Automatic crash recovery for XAResources </li>
</ul>
</li>
- <li>compliance with the JTS specification and OTS 1.2 specification from the
- OMG
+ <li>compliance with the JTS specification and OTS 1.2 specification from the
+ OMG
<ul>
<li>Distributed JTA implementation </li>
<li>support for distributed transactions (utilizing two-phase commit) </li>
<li>POA ORB support </li>
<li>interposition </li>
<li>transaction heuristics</li>
- <li>distributed transaction manager (co-located with the transaction initiator)
+ <li>distributed transaction manager (co-located with the transaction initiator)
or transaction manager server </li>
<li>checked/unchecked transaction behaviour </li>
- <li>supports both flat and nested transaction models, with nested-aware
+ <li>supports both flat and nested transaction models, with nested-aware
resources and resource adapters </li>
- <li>independent concurrency control system with support for type-specific
+ <li>independent concurrency control system with support for type-specific
concurrency control </li>
<li>support for CosTransaction::Current </li>
<li>direct and indirect transaction management </li>
@@ -103,7 +103,7 @@
<li>ORB independence via the ORB portability layer </li>
</ul>
</p>
-
+
<p>
This trail map will help you get started with running Arjuna transaction service product.
It is structured as follows:</p>
@@ -117,13 +117,13 @@
<li>
<a class="linkscoloured" href="part6.html">4. Making the Sample Application Persistent</a>: This trail describes tools allowing to build a persistent application</li>
<li>
- <a class="linkscoloured" href="part7.html">5. Recovery from Failure</a>: This trail describes via a simple scenario how ATS manages recovery from failure.</li>
+ <a class="linkscoloured" href="part7.html">5. Recovery from Failure</a>: This trail describes via a simple scenario how JBossTS manages recovery from failure.</li>
<li>
<a class="linkscoloured" href="next.html">6. Where Next?</a>: This trail indicates where to find additional information</li>
</ul>
<p>
- In addition to the trails listed above, a set of trails giving more explanation on concept around
- transaction processing and standards, and also a quick access to section explaining how to configure ATS
+ In addition to the trails listed above, a set of trails giving more explanation on concept around
+ transaction processing and standards, and also a quick access to section explaining how to configure JBossTS
are listed in the section "Additional Trails".</p>
<p><b>Note:</b>When running the local JTS transactions part of the trailmap, you will need to start
the recovery manager: java com.arjuna.ats.arjuna.recovery.RecoveryManager -test</p>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/next.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/next.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/next.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Where next?" rootpath="../..">
+<page title="JBossTS Trail map: Where next?" rootpath="../..">
<header> Trail map: Where next? </header>
<content>
<navigation>
@@ -39,7 +39,7 @@
<li>
<a class="linkscoloured" href="../../docs/user_guide/QuickStartGuide.pdf" target="_blank">JBossTS Quick Start Guide (pdf)</a> Additional documentation for the JBossTS product can be found in the <a class="linkscoloured" href="../../index.html" target="_blank">JBossTS documentation</a> directory.</li>
</ul>
- <p> Updates to the Arjuna products set, as well as additional sample material, are periodically made available via the Arjuna Technologies web site at <a class="linkscoloured" href="http://www.arjuna.com/" target="_blank">http://www.arjuna.com/</a> Please drop by from time to time to ensure you have the most comprehensive material available. If you experience difficulties using Arjuna products standalone or in conjunction with the JBoss platform, please contact <a class="linkscoloured" href="mailto:support at arjuna.com">support at arjuna.com</a>
+ <p> Updates to JBossTS, as well as additional sample material, are periodically made available via the web site at <a class="linkscoloured" href="http://www.jboss.org/jbosstm" target="_blank">http://www.jboss.org/jbosstm</a> Please drop by from time to time to ensure you have the most comprehensive material available.
</p>
</html>
</area>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/ots_overview.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/ots_overview.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/ots_overview.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: The OMG OTS" rootpath="../..">
+<page title="JBossTS Trail map: The OMG OTS" rootpath="../..">
<header> Trail map: OMG Object Request Broker </header>
<content>
<navigation>
@@ -98,11 +98,11 @@
</ul>
<h4>
<a name="program_models"/>Application programming models</h4>
-A client application program may use direct or indirect context management to
-manage a transaction. With indirect context management, an application uses the
-pseudo object called Current, provided by the Transaction Service , to associate
-the transaction context with the application thread of control. In direct context
-management, an application manipulates the Control object and the other objects
+A client application program may use direct or indirect context management to
+manage a transaction. With indirect context management, an application uses the
+pseudo object called Current, provided by the Transaction Service , to associate
+the transaction context with the application thread of control. In direct context
+management, an application manipulates the Control object and the other objects
associated with the transaction. <br>
An object may require transactions to be either explicitly or implicitly
propagated to its operations.</br>
@@ -156,11 +156,11 @@
</ul>
<h5>Examples</h5>
<ul>
- <li>Indirect and Implicit
- <p>In the code fragments below, a transaction originator uses indirect context
- management and implicit transaction propagation; txn_crt is an example of
- an object supporting the Current interface. The client uses the begin operation
- to start the transaction whichbecomes implicitly associated with the originator's
+ <li>Indirect and Implicit
+ <p>In the code fragments below, a transaction originator uses indirect context
+ management and implicit transaction propagation; txn_crt is an example of
+ an object supporting the Current interface. The client uses the begin operation
+ to start the transaction whichbecomes implicitly associated with the originator's
thread of control.</p>
<pre>...
@@ -174,15 +174,15 @@
txn_crt.commit(false)
</pre>
- <p> The program commits the transaction associated with the client thread.
- The report_heuristics argument is set to false so no report will be made
+ <p> The program commits the transaction associated with the client thread.
+ The report_heuristics argument is set to false so no report will be made
by the Transaction Service about possible heuristic decisions.</p>
</li>
- <li>Direct and Explicit
- <p>In the following example, a transaction originator uses direct context
- management and explicit transaction propagation. The client uses a factory
- object supporting the CosTransactions::TransactionFactory interface to create
- a new transaction and uses the returned Control object to retrieve the Ter
+ <li>Direct and Explicit
+ <p>In the following example, a transaction originator uses direct context
+ management and explicit transaction propagation. The client uses a factory
+ object supporting the CosTransactions::TransactionFactory interface to create
+ a new transaction and uses the returned Control object to retrieve the Ter
mi nat or and Coordinator objects.</p>
<pre>...
@@ -197,25 +197,25 @@
t.commit(false);
</pre>
- <p> The client issues requests, some of which involve transactional objects,
- in this case explicit propagation of the context is used. The Control object
- reference is passed as an explicit parameter of the request; it is declared
- in the OMG IDL of the interface. The transaction originator uses the Terminator
- object to commit the transaction; the report_heuristics argument is set
- to false: so no report will be made by the Transaction Service about possible
+ <p> The client issues requests, some of which involve transactional objects,
+ in this case explicit propagation of the context is used. The Control object
+ reference is passed as an explicit parameter of the request; it is declared
+ in the OMG IDL of the interface. The transaction originator uses the Terminator
+ object to commit the transaction; the report_heuristics argument is set
+ to false: so no report will be made by the Transaction Service about possible
heuristic decisions.</p>
</li>
</ul>
- <p>The main difference between direct and indirect context management is the effect
- on the invoking thread's transaction context. If using indirect (i.e., invoking
- operations through the Current pseudo object), then the thread's transaction
- context will be modified automatically by the OTS, e.g., if begin is called
- then the thread's notion of the current transaction will be modified to the
- newly created transaction; when that is terminated, the transaction previously
- associated with the thread (if any) will be restored as the thread's context
- (assuming subtransactions are supported by the OTS implementation). However,
- if using direct management, no changes to the threads transaction context are
- performed by the OTS: the application programmer assumes responsibility for
+ <p>The main difference between direct and indirect context management is the effect
+ on the invoking thread's transaction context. If using indirect (i.e., invoking
+ operations through the Current pseudo object), then the thread's transaction
+ context will be modified automatically by the OTS, e.g., if begin is called
+ then the thread's notion of the current transaction will be modified to the
+ newly created transaction; when that is terminated, the transaction previously
+ associated with the thread (if any) will be restored as the thread's context
+ (assuming subtransactions are supported by the OTS implementation). However,
+ if using direct management, no changes to the threads transaction context are
+ performed by the OTS: the application programmer assumes responsibility for
this. </p>
<h4>
OTS Interfaces</h4>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part1.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part1.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part1.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Installation Content" rootpath="../..">
+<page title="JBossTS Trail map: Installation Content" rootpath="../..">
<header>
Trail map: Installation Content
</header>
@@ -37,45 +37,45 @@
<area title="Installation Content">
<html>
<h4>Verifying Installation</h4>
-By default, JBossTS is installed in the directory <font face="Courier New,Courier">/opt/jboss/jbossts</font>
-on Unix machines, and <font face="Courier New,Courier">C:\Program Files\Arjuna\ats-4.0</font>
-on Windows, except if a different location has been specified during JBossTS
-installation. When installed, the JBossTS should have the following structure.
+By default, JBossTS is installed in the directory <font face="Courier New,Courier">/opt/jboss/jbossts</font>
+on Unix machines, and <font face="Courier New,Courier">C:\Program Files\Arjuna\ats-4.0</font>
+on Windows, except if a different location has been specified during JBossTS
+installation. When installed, the JBossTS should have the following structure.
<ul>
<li>
- <font face="Courier New,Courier">/bin</font>: this directory contains commands
- to run the OTS transaction manager server (if required) and the Recovery Manager,
+ <font face="Courier New,Courier">/bin</font>: this directory contains commands
+ to run the OTS transaction manager server (if required) and the Recovery Manager,
and scripts to configure environment variables needed to execute JBossTS.</li>
<li>
- <font face="Courier New,Courier">/docs</font>: this directory contains
- documentation on the way to installing, administering and programming ArjunaCore,
+ <font face="Courier New,Courier">/docs</font>: this directory contains
+ documentation on the way to installing, administering and programming ArjunaCore,
ArjunaTA and JBossTS.</li>
<li> <font face="Courier New,Courier">/etc</font>: this directory contains appropriate
properties files that can be used to configure the behaviour of the JBoss Transaction Service.</li>
<li>
- <font face="Courier New,Courier">/htdocs</font>: this directory describes
+ <font face="Courier New,Courier">/htdocs</font>: this directory describes
all APIs defined by JBossTS
</li>
<li>
- <font face="Courier New,Courier">/idl</font>: this directory contains the
- CORBA idl files that may be registered with your interface repository prior
+ <font face="Courier New,Courier">/idl</font>: this directory contains the
+ CORBA idl files that may be registered with your interface repository prior
to running any applications.
</li>
<li>
<font face="Courier New,Courier">/jacorb</font>: This directory contains the jacorb distribution.
</li>
<li>
- <font face="Courier New,Courier">/lib</font>: this directory contains the
- jar files that contains packages defined by the JBossTS. These jar files
+ <font face="Courier New,Courier">/lib</font>: this directory contains the
+ jar files that contains packages defined by the JBossTS. These jar files
shall be added in the CLASSPATH
</li>
<li>
- <font face="Courier New,Courier">/services</font>: this directory contains the
+ <font face="Courier New,Courier">/services</font>: this directory contains the
appropriates scripts, jar and configuration files allowing to start and stop standalone Transaction Service and Recovery Manager
</li>
<li>
- <font face="Courier New, Courier, mono">/trail_map</font>: contains examples
+ <font face="Courier New, Courier, mono">/trail_map</font>: contains examples
applications</li>
</ul>
<h4>
@@ -83,19 +83,19 @@
<p>To ensure that your JBossTS installation is fully operational, we will run the simple demo.</p>
<p>Please follow these steps before running the transactional applications</p>
<ul>
- <li>Ensure you have the Ant build system installed. Ant is a Java build tool,
- similar to make. It is available for free from http://ant.apache.org/ The
+ <li>Ensure you have the Ant build system installed. Ant is a Java build tool,
+ similar to make. It is available for free from http://ant.apache.org/ The
sample application requires version 1.5.1 or later. </li>
- <li>The PATH and CLASSPATH environment variables need to be set appropriately
- to use JBoss Transaction Service. To make this easier, we provide a shell
- script <font face="Courier New, Courier, mono">setup_env.sh</font> (and for
- Windows a batch file <font face="Courier New, Courier, mono">setup_env.bat</font>)
+ <li>The PATH and CLASSPATH environment variables need to be set appropriately
+ to use JBoss Transaction Service. To make this easier, we provide a shell
+ script <font face="Courier New, Courier, mono">setup_env.sh</font> (and for
+ Windows a batch file <font face="Courier New, Courier, mono">setup_env.bat</font>)
in the directory <font face="Courier New, Courier, mono"><jbossts_install_root>/bin/</font>
</li>
- <li>From a command prompt, cd to the directory containing the build.xml file
- (<font face="Courier New, Courier, mono"><jbossts_install_root>/trail_map</font>)
- and type 'ant'. This will compile a set of sources files located under <font face="Courier New, Courier, mono"><jbossts_install_root>/trail_map/src</font>
- then create an application .jar file named <em>jbossts-demo.jar</em>. under
+ <li>From a command prompt, cd to the directory containing the build.xml file
+ (<font face="Courier New, Courier, mono"><jbossts_install_root>/trail_map</font>)
+ and type 'ant'. This will compile a set of sources files located under <font face="Courier New, Courier, mono"><jbossts_install_root>/trail_map/src</font>
+ then create an application .jar file named <em>jbossts-demo.jar</em>. under
the directory <font face="Courier New, Courier, mono"><jbossts_install_root>/trail_map/lib</font>
</li>
<li>Add the generated jar file to the CLASSPATH environment variable.</li>
@@ -103,7 +103,7 @@
<b>Ensure that JBossTS jar files appear before jacorb jar files. </b></li>
</ul>
<ul>
- <li> Start the server. <a class="linkscoloured" href="../src/com/arjuna/demo/simple/HelloServer.java">(HelloServer.java)</a> (<i>Note: The source code for the trailmap is fully documented and can often contain very useful tips and information that may not be reflected elsewhere in the trailmap</i>)</li>
+ <li> Start the server. <a class="linkscoloured" href="../src/com/arjuna/demo/simple/HelloServer.java">(HelloServer.java)</a> (<i>Note: The source code for the trailmap is fully documented and can often contain very useful tips and information that may not be reflected elsewhere in the trailmap</i>)</li>
</ul>
<blockquote>
<p>
@@ -111,8 +111,8 @@
</p>
</blockquote>
<ul>
- <li>Open another command prompt, go to the same /trail_map directory and start
- the client <a class="linkscoloured" href="../src/com/arjuna/demo/simple/HelloClient.java">(HelloClient.java)</a> . Be sure that the environment variable CLASSPATH is set with the
+ <li>Open another command prompt, go to the same /trail_map directory and start
+ the client <a class="linkscoloured" href="../src/com/arjuna/demo/simple/HelloClient.java">(HelloClient.java)</a> . Be sure that the environment variable CLASSPATH is set with the
same value as explained above. </li>
</ul>
<blockquote>
@@ -129,26 +129,26 @@
<p>In the server, which must be stopped by hand, you should see:</p>
<pre>
Hello - called within a scope of a transaction</pre>
-
+
<h4>Setting properties</h4>
-The JBoss Transaction Service has been designed to be highly configurable at runtime through the use of various
-property attributes. Although these attributes can be provided at runtime on the
+The JBoss Transaction Service has been designed to be highly configurable at runtime through the use of various
+property attributes. Although these attributes can be provided at runtime on the
command line, it is possible (and may be more convenient) to specify them through the
-properties file <font face="Courier New,Courier">arjunajts-properties.xml</font> located under the <font face="Courier New,Courier">/etc</font> directory of the ATS distribution.
- <p>More details on the way to configure the behavior of JBossTS can be found <a class="linkscoloured" href="JBossTS_Configuration.html">here</a>.
+properties file <font face="Courier New,Courier">arjunajts-properties.xml</font> located under the <font face="Courier New,Courier">/etc</font> directory of the JBossTS distribution.
+ <p>More details on the way to configure the behavior of JBossTS can be found <a class="linkscoloured" href="JBossTS_Configuration.html">here</a>.
</p>
-
+
<h4>Specifying the ORB to use</h4>
- <p>JDK releases from 1.2.2 onwards include a minimum ORB implementation from Sun.
- If using such a JDK in conjunction with another ORB it is necessary to tell
- the JVM which ORB to use. This happens by specifying the org.omg.CORBA.ORBClass
+ <p>JDK releases from 1.2.2 onwards include a minimum ORB implementation from Sun.
+ If using such a JDK in conjunction with another ORB it is necessary to tell
+ the JVM which ORB to use. This happens by specifying the org.omg.CORBA.ORBClass
<br/>
- and org.omg.CORBA.ORBSingletonClass properties. In earlier versions of the JBossTS
- it was necessary to specify these properties explicitly, either on the command
- line of in the properties file. However, it is no longer a requirement to do
- this, as the <a class="linkscoloured" href="JBossTS_ORBPortability.html">ORB Portability</a> classes
- will ensure that these properties are automatically set when required. Of course
- it is still possible to specify these values explicitly (and necessary if not
+ and org.omg.CORBA.ORBSingletonClass properties. In earlier versions of the JBossTS
+ it was necessary to specify these properties explicitly, either on the command
+ line of in the properties file. However, it is no longer a requirement to do
+ this, as the <a class="linkscoloured" href="JBossTS_ORBPortability.html">ORB Portability</a> classes
+ will ensure that these properties are automatically set when required. Of course
+ it is still possible to specify these values explicitly (and necessary if not
using the ORB initialization methods)</p>
</html>
</area>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part2.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part2.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part2.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,12 +16,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
<page
- title="JBoss (a Division of Redhat): Trail map: Overview of the Distributed Transaction Processing"
+ title="JBossTS Trail map: Overview of the Distributed Transaction Processing"
rootpath="../..">
<header>
Trail map: Overview of the Distributed Transaction Processing
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part3.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part3.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part3.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,12 +16,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
<page
- title="JBoss (a Division of Redhat): Trail map: Overview of the Distributed Transaction Processing"
+ title="JBossTS Trail map: Overview of the Distributed Transaction Processing"
rootpath="../..">
<header>Trail map: JBossTS Overview</header>
<content>
@@ -38,29 +38,29 @@
<area title="JBossTS Overview">
<html>
<p>
- JBoss Transaction Service 4.0 (ATS 4.0) assures
+ JBoss Transaction Service (JBossTS) assures
complete, accurate business transactions for any
Java based applications, including those written for
- the J2EE and EJB frameworks.
+ the Java EE and EJB frameworks.
</p>
<p>
JBossTS is a 100% Java implementation of a
distributed transaction management system based on
- the Sun Microsystems J2EE Java Transaction Service
+ the Sun Microsystems Java EE Java Transaction Service
(JTS) standard. Our implementation of the JTS
utilizes the Object Management Group's (OMG) Object
Transaction Service (OTS) model for transaction
- interoperability as recommended in the J2EE and EJB
+ interoperability as recommended in the Java EE and EJB
standards. Although any JTS-compliant product will
allow Java objects to participate in transactions,
- one of the key features of ATS is it's 100% Java
- implementation. This allows ATS to support fully
+ one of the key features of JBossTS is it's 100% Java
+ implementation. This allows JBossTS to support fully
distributed transactions that can be coordinated by
distributed parties.
<p>
JBossTS runs can be run both as an embedded
distributed service of an application server
- (e.g., HPAS. JBoss), affording the user all the
+ (e.g. JBossAS), affording the user all the
added benefits of the application server
environment such as real-time load balancing,
unlimited linear scalability and unmatched fault
@@ -71,20 +71,18 @@
</p>
<p>
In addition to providing full compliance with
- the latest version of the JTS specification, ATS
- 4.0 leads the market in providing many advanced
+ the latest version of the JTS specification, JBossTS
+ leads the market in providing many advanced
features such as fully distributed transactions
and ORB portability with POA support.
</p>
<p>
- ATS 4.0 is supported on HP-UX 11i, Linux RedHat,
- Microsoft Windows NT 4.0, Microsoft Windows
- 2000, Microsoft Window XP, Sun Solaris 8
- operating environments and with any JDK 1.3
- compliant environment.
+ JBossTS works on a number of operating systems including
+ Red Hat linux, Sun Solaris and Microsoft Windows XP.
+ It requires a Java 5 or later environment.
</p>
<p>
- The Java Transaction API support for ATS comes
+ The Java Transaction API support for JBossTS comes
in two flavours:
</p>
<ul>
@@ -99,14 +97,14 @@
<h5>Key features</h5>
<ul>
<li>
- full compliant with the JTA 1.0.1
+ full compliant with the JTA 1.1
specification:
<ul>
<li>
Purely local (ORB-less) JTA offers
the fastest JTA performance
</li>
- <li>JDBC 2.0 support</li>
+ <li>JDBC 3 support</li>
<li>XA compliance</li>
<li>
JDBC drivers for database access
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part4.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part4.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part4.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,8 +16,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../.."> <header> Trail map: The Banking Application </header> <content> <navigation> <links include="includes/www_arjuna_com_navigation.xml"/> <links include="includes/trailmap_navigation.xml"/> <links title="Navigation"> <link ref="index.html">Home</link> <link ref="part1.html">Previous</link> <link ref="part5.html">Next</link> </links> <links include="includes/trailmap_additional.xml"/> </navigation> <area title="The Sample Application"> <html> <h4>The Banking Application</h4> <p>The sample application consists of a banking application that involves a bank able to manage accounts on behalf of clients. Clients can obtain information on accounts and perform operations such credit, withdraw and transfer money from one account to an other.</p> <p> <strong> <img src="includes/banking_application_1.GIF"/> !
</strong> </p> <p>Figure 1 - The Banking Applications</p> <ol> <li>The client application:</li> </ol> <ul> <li>Initializes the banking object. </li> <li> Choose an operation to be performed on the banking object. Possible operations are: <ul> <li>Create Account: this operation asks the bank to create a new account credit it with the first amount provided in the request. The creation consists: <ul> <li>to create an Account Object, then</li> </ul> </li> <li>Get Balance: this operation invokes the bank to obtain the balance of an account. <ul> <li>the account is first returned by the bank, then</li> <li>the account is asked to return its balance</li> </ul> </li> <li>Withdraw: this operation is invoked to withdraw money from an account. If the final balance is negative the withdraw is refused and the !
associated transaction aborted</li> <li>Credit: this o
peration is performed to credit an account</li> <li>Transfer: This operation is used to transfer money from an account to another. If the transfer leads to get a negative balance of the debited account, the transfer is refused and the associated transaction is aborted.</li> <li>Exit: This operation terminates the client</li> </ul> </li> <li>Waits for a response. </li> </ul> <ol start="2"> <li>The Bank Object</li> </ol> <ul> <li>Creates Account Objects using name</li> <li>Maintains the list of created Accounts</li> <li>Returns, when asked, the Account Object requested by the client. If the Account doesn't exist an exception is returned to the client.</li> </ul> <ol start="3"> <li>An Account Object</li> </ol> <ul> <li>Performs operations requested by the client <ul> <li>credit,</li> <li>withdraw (debit), and </li> <li>return the current b!
alance.</li> </ul> </li> </ul> <p>Each operation provided to the client leads to the creation of a transaction; therefore in order to commit or rollback changes made on an account, a resource is associated with the account to participate to the transaction commitment protocol. According to the final transaction decision, the resource is able to set the Account either to its initial state (in case of rollback) or to the final state (in case of commit). From the transactional view, Figure 2 depicts of transactional components.</p> <p> <img src="includes/banking_application_2.GIF"/> </p> <p>Figure 2 - The Banking Application and the transactional Component</p> </html> </area> </content> <footer/> </page>
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../.."> <header> Trail map: The Banking Application </header> <content> <navigation> <links include="includes/www_arjuna_com_navigation.xml"/> <links include="includes/trailmap_navigation.xml"/> <links title="Navigation"> <link ref="index.html">Home</link> <link ref="part1.html">Previous</link> <link ref="part5.html">Next</link> </links> <links include="includes/trailmap_additional.xml"/> </navigation> <area title="The Sample Application"> <html> <h4>The Banking Application</h4> <p>The sample application consists of a banking application that involves a bank able to manage accounts on behalf of clients. Clients can obtain information on accounts and perform operations such credit, withdraw and transfer money from one account to an other.</p> <p> <strong> <img src="includes/banking_application_1.GIF"/> </strong> </!
p> <p>Figure 1 - The Banking Applications</p> <ol> <li>The client application:</li> </ol> <ul> <li>Initializes the banking object. </li> <li> Choose an operation to be performed on the banking object. Possible operations are: <ul> <li>Create Account: this operation asks the bank to create a new account credit it with the first amount provided in the request. The creation consists: <ul> <li>to create an Account Object, then</li> </ul> </li> <li>Get Balance: this operation invokes the bank to obtain the balance of an account. <ul> <li>the account is first returned by the bank, then</li> <li>the account is asked to return its balance</li> </ul> </li> <li>Withdraw: this operation is invoked to withdraw money from an account. If the final balance is negative the withdraw is refused and the associated t!
ransaction aborted</li> <li>Credit: this operation is performed
to credit an account</li> <li>Transfer: This operation is used to transfer money from an account to another. If the transfer leads to get a negative balance of the debited account, the transfer is refused and the associated transaction is aborted.</li> <li>Exit: This operation terminates the client</li> </ul> </li> <li>Waits for a response. </li> </ul> <ol start="2"> <li>The Bank Object</li> </ol> <ul> <li>Creates Account Objects using name</li> <li>Maintains the list of created Accounts</li> <li>Returns, when asked, the Account Object requested by the client. If the Account doesn't exist an exception is returned to the client.</li> </ul> <ol start="3"> <li>An Account Object</li> </ol> <ul> <li>Performs operations requested by the client <ul> <li>credit,</li> <li>withdraw (debit), and </li> <li>return the current balance.</li> </!
ul> </li> </ul> <p>Each operation provided to the client leads to the creation of a transaction; therefore in order to commit or rollback changes made on an account, a resource is associated with the account to participate to the transaction commitment protocol. According to the final transaction decision, the resource is able to set the Account either to its initial state (in case of rollback) or to the final state (in case of commit). From the transactional view, Figure 2 depicts of transactional components.</p> <p> <img src="includes/banking_application_2.GIF"/> </p> <p>Figure 2 - The Banking Application and the transactional Component</p> </html> </area> </content> <footer/> </page>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,12 +16,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
<page
- title="JBoss (a Division of Redhat): Trail map: Running and Testing Examples"
+ title="JBossTS Trail map: Running and Testing Examples"
rootpath="../..">
<header>Trail map: Running and Testing Examples</header>
<content>
@@ -101,31 +101,31 @@
</ul>
<p>
<h5>Local transaction with JTA</h5>
- To configure ATS for such transaction, edit the
+ To configure JBossTS for such transaction, edit the
arjunajts-properties.xml file and set the following
properties to the appropriate values:
<pre>
- <property
- name="com.arjuna.ats.jta.jtaTMImplementation"
- value="com.arjuna.ats.internal.jta.transaction.
- arjunacore.TransactionManagerImple"/>
- <property
- name="com.arjuna.ats.jta.jtaUTImplementation"
- value="com.arjuna.ats.internal.jta.transaction.
- arjunacore.UserTransactionImple"/>
+ <property
+ name="com.arjuna.ats.jta.jtaTMImplementation"
+ value="com.arjuna.ats.internal.jta.transaction.
+ arjunacore.TransactionManagerImple"/>
+ <property
+ name="com.arjuna.ats.jta.jtaUTImplementation"
+ value="com.arjuna.ats.internal.jta.transaction.
+ arjunacore.UserTransactionImple"/>
</pre>
<h5>Distributed transaction with JTA</h5>
- While for a distributed transactions case, ATS need
+ While for a distributed transactions case, JBossTS need
to be configured as follow:
<pre>
- <property
- name="com.arjuna.ats.jta.jtaTMImplementation"
- value="com.arjuna.ats.internal.jta.transaction.
- jts.TransactionManagerImple"/> <property
- name="com.arjuna.ats.jta.jtaUTImplementation"
- value="com.arjuna.ats.internal.jta.transaction.
- jts.UserTransactionImple"/>
+ <property
+ name="com.arjuna.ats.jta.jtaTMImplementation"
+ value="com.arjuna.ats.internal.jta.transaction.
+ jts.TransactionManagerImple"/> <property
+ name="com.arjuna.ats.jta.jtaUTImplementation"
+ value="com.arjuna.ats.internal.jta.transaction.
+ jts.UserTransactionImple"/>
</pre>
Using JTA to create a distributed transaction need
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jta.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jta.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jta.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Trail map: The banking Application with JTA </header>
<content>
<navigation>
@@ -34,31 +34,31 @@
</navigation>
<area title="Building The Banking Application with JTA ">
<html>
-
- <p>From an architectural point of view of <a class="linkscoloured" href="JTA_Overview.html">JTA</a>, the bank client is considered as
+
+ <p>From an architectural point of view of <a class="linkscoloured" href="JTA_Overview.html">JTA</a>, the bank client is considered as
an application program able to manage transactions via the <a class="linkscoloured" href="JTA_Overview.html#UserTransaction">javax.transaction.UserTransaction </a> interface. The following portion of code illustrates how a JTA transaction is
started and terminated when the client asks to transfer money from one account to another. This also describes what are JBossTS packages that need to be used
in order to obtain appropriate objects instances (such UserTransaction).</p>
- <p>Note: The code below is a simplified view of the BankClient.java program. Only the transfer operation is illustrated; other operations manage transactions in the same way.
+ <p>Note: The code below is a simplified view of the BankClient.java program. Only the transfer operation is illustrated; other operations manage transactions in the same way.
(see for details the <a href="../src/com/arjuna/demo/jta/localbank/BankClient.java">BankClient.java</a>)</p>
<pre>
package com.arjuna.demo.jta.localbank;
public class BankClient
{
private Bank _bank;
- // This operation is used to make a transfer
+ // This operation is used to make a transfer
//from an account to another account
private void makeTransfer()
{
System.out.print("Take money from : ");
String name_supplier = input();
-
+
System.out.print("Put money to : ");
String name_consumer = input();
-
+
System.out.print("Transfer amount : ");
String amount = input();
-
+
float famount = 0;
try
{
@@ -69,21 +69,21 @@
System.out.println("Invalid float number, abort operation...");
return;
}
-
+
try
{
- //the following instruction asks a specific ArjunaTA
+ //the following instruction asks a specific ArjunaTA
//class to obtain a UserTransaction instance
- <strong>javax.transaction.UserTransaction userTran =
+ <strong>javax.transaction.UserTransaction userTran =
com.arjuna.ats.jta.UserTransaction.userTransaction()</strong>;
System.out.println("Beginning a User transaction to get balance");
<strong>userTran.begin()</strong>;
-
+
Account supplier = _bank.get_account( name_supplier );
Account consumer = _bank.get_account( name_consumer );
supplier.debit( famount );
consumer.credit( famount );
-
+
<strong>userTran.commit( )</strong>;
}
catch (Exception e)
@@ -94,26 +94,26 @@
......
}
</pre>
-<p>The Bank object has mainly two operations: creating an account, which is added in the account list,
+<p>The Bank object has mainly two operations: creating an account, which is added in the account list,
and returning an Account object. No transactional instruction is performed by the Bank object</p>
<pre>
package com.arjuna.demo.jta.localbank;
public class Bank {
private java.util.Hashtable _accounts;
-
+
public Bank()
{
_accounts = new java.util.Hashtable();
}
-
+
public Account create_account( String name )
{
Account acc = new Account(name);
_accounts.put( name, acc );
return acc;
}
-
+
public Account get_account(String name)
throws NotExistingAccount
{
@@ -125,16 +125,16 @@
}
</pre>
-<p>The Account object provides mainly three methods <font face="Courier New, Courier, mono">balance</font>,
- <font face="Courier New, Courier, mono">credit</font> and <font face="Courier New, Courier, mono">withdraw</font>.
- However, in order to provide the transactional behaviour, rather than to modify
- the current account directly (according to credit or withdraw) this task is
- delegated to an AccountResource object that is able, according to the transaction
+<p>The Account object provides mainly three methods <font face="Courier New, Courier, mono">balance</font>,
+ <font face="Courier New, Courier, mono">credit</font> and <font face="Courier New, Courier, mono">withdraw</font>.
+ However, in order to provide the transactional behaviour, rather than to modify
+ the current account directly (according to credit or withdraw) this task is
+ delegated to an AccountResource object that is able, according to the transaction
outcome, to set the account value either to its initial state or its final state.<br/>
- The AccountResource object is in fact an object that implements the <a class="linkscoloured" href="JTA_Overview.html#XAResource">javax.transactions.XAResource</a>,
- then able to participate to the transaction commitment. For this aim, the Account
- object has to register or enlist the AccountResource object as a participant
- after having obtaining the reference of the <a class="linkscoloured" href="JTA_Overview.html#Transaction">javax.transaction.Transaction</a> object
+ The AccountResource object is in fact an object that implements the <a class="linkscoloured" href="JTA_Overview.html#XAResource">javax.transactions.XAResource</a>,
+ then able to participate to the transaction commitment. For this aim, the Account
+ object has to register or enlist the AccountResource object as a participant
+ after having obtaining the reference of the <a class="linkscoloured" href="JTA_Overview.html#Transaction">javax.transaction.Transaction</a> object
via the <a class="linkscoloured" href="JTA_Overview.html#TransactionManager">javax.transaction.TransactionManager</a> object</p>
<pre>
@@ -144,45 +144,45 @@
{
float _balance;
AccountResource accRes = null;
-
+
public Account(String name)
{
_name = name;
_balance = 0;
}
-
+
public float balance()
{
return getXAResource().balance();;
}
-
+
public void credit( float value )
{
getXAResource().credit( value );
}
-
+
public void debit( float value )
{
getXAResource().debit( value );
}
-
+
public AccountResource getXAResource()
{
-
+
try
{
- <strong>javax.transaction.TransactionManager transactionManager =
+ <strong>javax.transaction.TransactionManager transactionManager =
com.arjuna.ats.jta.TransactionManager.transactionManager();
- javax.transaction.Transaction currentTrans =
+ javax.transaction.Transaction currentTrans =
transactionManager.getTransaction();</strong>
-
+
if (accRes == null) {
- <strong>currentTrans.enlistResource(
+ <strong>currentTrans.enlistResource(
</strong>accRes = new AccountResource(this, _name)<strong> );</strong>
}
-
+
currentTrans.delistResource( accRes, XAResource.TMSUCCESS );
-
+
}
catch (Exception e)
{
@@ -194,11 +194,11 @@
}
</pre>
-<p>The AccountResource class that implements the javax.transaxtion.XAResource
- interface provides similar methods as the Account class (credit, withdraw and
- balance) but also all methods specified by the javax.transaxtion.XAResource.
- The following portion of code describes how the methods <font face="Courier New, Courier, mono">prepare</font>,
- <font face="Courier New, Courier, mono">commit</font> and <font face="Courier New, Courier, mono">rollback</font>
+<p>The AccountResource class that implements the javax.transaxtion.XAResource
+ interface provides similar methods as the Account class (credit, withdraw and
+ balance) but also all methods specified by the javax.transaxtion.XAResource.
+ The following portion of code describes how the methods <font face="Courier New, Courier, mono">prepare</font>,
+ <font face="Courier New, Courier, mono">commit</font> and <font face="Courier New, Courier, mono">rollback</font>
are implemented.</p>
<pre>
@@ -211,28 +211,28 @@
_initial_balance = account._balance;
_current_balance = _initial_balance;
}
-
+
public float balance()
{
return _current_balance;
}
-
+
public void credit( float value )
{
_current_balance += value;
}
-
+
public void debit( float value )
{
_current_balance -= value;
}
-
+
<strong>public void commit(Xid id, boolean onePhase) throws XAException</strong>
{
- //The value of the associated Account object is modified
+ //The value of the associated Account object is modified
_account._balance = _current_balance;
}
-
+
<strong>public int prepare(Xid xid) throws XAException</strong>
{
if ( _initial_balance == _current_balance ) //account not modified
@@ -240,7 +240,7 @@
if ( _current_balance < 0 )
throw new XAException(XAException.XA_RBINTEGRITY);
//If the integrity of the account is corrupted then vote rollback
- return (XA_OK); //return OK
+ return (XA_OK); //return OK
}
</pre>
<pre>
@@ -252,12 +252,12 @@
<pre> private float _initial_balance;
private float _current_balance;
private Account _account;
-
+
}
}</pre>
<h5>Sample Application Source Code</h5>
- <p>Full source code for the banking application with JTA is included to provide
+ <p>Full source code for the banking application with JTA is included to provide
you with a starting point for experimentation. </p>
<ul>
<li>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Trail map: Running and Testing Examples </header>
<content>
<navigation>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_explicit.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_explicit.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_explicit.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Trail map: Running and Testing Examples </header>
<content>
<navigation>
@@ -35,21 +35,21 @@
<area title="Running and Testing examples">
<html>
<h4>How the Banking Application is build using JTS interfaces</h4>
- <p>The bank client is an application program able to manage transactions either in a <a class="linkscoloured" href="ots_overview.html#program_models">direct or indirect
- management mode</a>, respectively with the interfaces <a class="linkscoloured" href="ots_overview.html#TransactionFactory">org.omg.CosTransactions.TransactionFactory</a>
- and <a class="linkscoloured" href="ots_overview.html#Terminator">org.omg.CosTransactions.Terminator</a> or with the <a class="linkscoloured" href="ots_overview.html#Current">org.omg.CosTransactions.Current</a>
- interface. Transactions created by the client in the Banking application are
+ <p>The bank client is an application program able to manage transactions either in a <a class="linkscoloured" href="ots_overview.html#program_models">direct or indirect
+ management mode</a>, respectively with the interfaces <a class="linkscoloured" href="ots_overview.html#TransactionFactory">org.omg.CosTransactions.TransactionFactory</a>
+ and <a class="linkscoloured" href="ots_overview.html#Terminator">org.omg.CosTransactions.Terminator</a> or with the <a class="linkscoloured" href="ots_overview.html#Current">org.omg.CosTransactions.Current</a>
+ interface. Transactions created by the client in the Banking application are
done in the indirect mode. </p>
- <p>Invoking a remote object within a CORBA environment means that the remote object
- implements a CORBA interface defined in a CORBA idl file. The following Bank.idl
- describes the interfaces then the possible kind of distributed CORBA objects
- involved in the banking application. There is no any interface that inherits
- the <a class="linkscoloured" href="ots_overview.html#Terminator">CosTransactions::TransactionalObject</a> interface, which means that for any
- remote invocations the transactional context is normally not propagated. However,
- since the Account object may have to register Resource objects that participate
- to transaction completion, a context is needed. In the following Bank.idl file
- operations defined in the Account interface have explicitly in their signature
- the CosTransactions::Control argument meaning that it passed explicitly by the
+ <p>Invoking a remote object within a CORBA environment means that the remote object
+ implements a CORBA interface defined in a CORBA idl file. The following Bank.idl
+ describes the interfaces then the possible kind of distributed CORBA objects
+ involved in the banking application. There is no any interface that inherits
+ the <a class="linkscoloured" href="ots_overview.html#Terminator">CosTransactions::TransactionalObject</a> interface, which means that for any
+ remote invocations the transactional context is normally not propagated. However,
+ since the Account object may have to register Resource objects that participate
+ to transaction completion, a context is needed. In the following Bank.idl file
+ operations defined in the Account interface have explicitly in their signature
+ the CosTransactions::Control argument meaning that it passed explicitly by the
caller - in this case the Bank Client program.</p>
<pre>
@@ -64,10 +64,10 @@
void credit( <strong>in CosTransactions::Control ctrl</strong>, in float value );
void debit( <strong>in CosTransactions::Control ctrl</strong>, in float value );
};
-
+
exception NotExistingAccount
{ };
-
+
interface Bank
{
Account create_account( in string name );
@@ -80,12 +80,12 @@
};
</pre>
- <p>The following portion of code illustrates how a JTS transaction is started
- and terminated when the client asks to transfer money from one account to another.
- This also describes what are JBossTS packages that need to be used in order
+ <p>The following portion of code illustrates how a JTS transaction is started
+ and terminated when the client asks to transfer money from one account to another.
+ This also describes what are JBossTS packages that need to be used in order
to obtain appropriate objects instances (such Current).</p>
- <p>Note: The code below is a simplified view of the BankClient.java program. Only
- the transfer operation is illustrated; other operations manage transactions
+ <p>Note: The code below is a simplified view of the BankClient.java program. Only
+ the transfer operation is illustrated; other operations manage transactions
in the same way. (see for details the <a class="linkscoloured" href="../src/com/arjuna/demo/jts/explicitremotebank/BankClient.java">BankClient.java</a>)</p>
<pre>package com.arjuna.demo.jta.remotebank;
@@ -94,25 +94,25 @@
{
private Bank _bank;
....
- // This operation is used to make a transfer
+ // This operation is used to make a transfer
//from an account to another account
private void makeTransfer()
{
- //get the name of the supplier(name_supplier) and
+ //get the name of the supplier(name_supplier) and
// the consumer(name_consumer)
// get the amount to transfer (famount)
...
try
{
- //the following instruction asks a specific
+ //the following instruction asks a specific
//JBossTS class to obtain a Current instance
<strong>Current current = OTSManager.get_current(); </strong>
System.out.println("Beginning a User transaction to get balance");
<strong>current.begin()</strong>;
-
+
Account supplier = _bank.get_account( name_supplier );
Account consumer = _bank.get_account( name_consumer );
- supplier.debit( <strong>current.get_control()</strong>, famount );
+ supplier.debit( <strong>current.get_control()</strong>, famount );
<strong>//The Control is explicitly propagated</strong>
consumer.credit( <strong>current.get_control()</strong>, famount );
<strong>current.commit( )</strong>;
@@ -122,19 +122,19 @@
...
}
}</pre>
- <p>Since JTS is used invocations against an ORB are needed, such ORB and Object
- Adapter instantiation and initialisation. To ensure a better portability,
- the <a class="linkscoloured" href="JBossTS_ORBPortability.html"> ORB Portability API</a> provides a set of
+ <p>Since JTS is used invocations against an ORB are needed, such ORB and Object
+ Adapter instantiation and initialisation. To ensure a better portability,
+ the <a class="linkscoloured" href="JBossTS_ORBPortability.html"> ORB Portability API</a> provides a set of
methods that can be used as described below. </p>
<pre>public static void main( String [] args )
{
- ....
+ ....
<strong>myORB = ORB.getInstance("test");// Create an ORB instance
myORB.initORB(args, null); //Initialise the ORB
</strong>
org.omg.CORBA.Object obj = null;
try
- {
+ {
//Read the reference string from a file then convert to Object
....
obj = myORB.orb().string_to_object(stringTarget);
@@ -143,23 +143,23 @@
{
...
}
- Bank bank = BankHelper.narrow(obj);
+ Bank bank = BankHelper.narrow(obj);
....
}
</pre>
- <p>The Bank object has mainly two operations: creating an account, which is added
- in the account list, and returning an Account object. No transactional instruction
- is performed by the Bank object. The following lines decribe the implementation
+ <p>The Bank object has mainly two operations: creating an account, which is added
+ in the account list, and returning an Account object. No transactional instruction
+ is performed by the Bank object. The following lines decribe the implementation
of the Bank CORBA object</p>
-
+
<pre>public class BankImpl extends BankPOA {
public BankImpl(OA oa)
{
_accounts = new java.util.Hashtable();
- _oa = oa;
+ _oa = oa;
}
-
+
public Account create_account( String name )
{
AccountImpl acc = new AccountImpl(name);
@@ -167,7 +167,7 @@
return com.arjuna.demo.jts.remotebank.AccountHelper.
narrow(_oa.corbaReference(acc));
}
-
+
public Account get_account(String name)
throws NotExistingAccount
{
@@ -175,18 +175,18 @@
if ( acc == null )
throw new NotExistingAccount("The Account requested does not exist");
return com.arjuna.demo.jts.remotebank.AccountHelper.
- narrow(_oa.corbaReference(acc));
+ narrow(_oa.corbaReference(acc));
}
private java.util.Hashtable _accounts;// Accounts created by the Bank
private OA _oa;
}</pre>
- <p>After having defined an implementation of the Bank object, we should now create
- an instance and make it available for client requests. This is the role of the
- Bank Server that has the responsibility to create the ORB and the Object Adapater
- instances, then the Bank CORBA object that has its object reference stored in
- a file well known by the bank client. The following lines describe how the Bank
+ <p>After having defined an implementation of the Bank object, we should now create
+ an instance and make it available for client requests. This is the role of the
+ Bank Server that has the responsibility to create the ORB and the Object Adapater
+ instances, then the Bank CORBA object that has its object reference stored in
+ a file well known by the bank client. The following lines describe how the Bank
server is implemented.</p>
-
+
<pre>public class BankServer
{
public static void main( String [] args )
@@ -201,27 +201,27 @@
myOA.initOA();</strong>
....
<strong>BankImpl bank = new BankImpl(myOA);</strong>
-
+
String reference = <strong>myORB.orb().
object_to_string(myOA.corbaReference(bank))</strong>;
//Store the Object reference in the file
...
-
+
System.out.println("The bank server is now ready...");
<strong>myOA.run();</strong>
}
}</pre>
-
- <p>The Account object provides mainly three methods <font face="Courier New, Courier, mono">balance</font>,
- <font face="Courier New, Courier, mono">credit</font> and <font face="Courier New, Courier, mono">withdraw</font>.
- However, in order to provide the transactional behaviour, rather than to modify
- the current account directly (according to credit or withdraw) this task is
- delegated to an AccountResource object that is able, according to the transaction
+
+ <p>The Account object provides mainly three methods <font face="Courier New, Courier, mono">balance</font>,
+ <font face="Courier New, Courier, mono">credit</font> and <font face="Courier New, Courier, mono">withdraw</font>.
+ However, in order to provide the transactional behaviour, rather than to modify
+ the current account directly (according to credit or withdraw) this task is
+ delegated to an AccountResource object that is able, according to the transaction
outcome, to set the account value either to its initial state or its final state.<br/>
- The AccountResource object is in fact an object that implements the <a class="linkscoloured" href="ots_overview.html#Resource">org.omg.CosTransactions.Resource</a>,
- then able to participate to the transaction commitment. For this aim, the Account
- object has to register the AccountResource object as a participant, after having
- obtaining the reference of the <a class="linkscoloured" href="ots_overview.html#Coordinator">org.omg.CosTransactions.Coordinator</a> object ,
+ The AccountResource object is in fact an object that implements the <a class="linkscoloured" href="ots_overview.html#Resource">org.omg.CosTransactions.Resource</a>,
+ then able to participate to the transaction commitment. For this aim, the Account
+ object has to register the AccountResource object as a participant, after having
+ obtaining the reference of the <a class="linkscoloured" href="ots_overview.html#Coordinator">org.omg.CosTransactions.Coordinator</a> object ,
itself obtained via the <a class="linkscoloured" href="ots_overview.html#Control">org.omg.CosTransactions.Control</a> object</p>
<pre>
@@ -234,56 +234,56 @@
{
float _balance;
AccountResource accRes = null;
-
+
public Account(String name )
{
_name = name;
_balance = 0;
}
-
+
public float balance(Control ctrl)
{
return getResource(ctrl).balance();;
}
-
+
public void credit(Control ctrl, float value )
{
getResource(ctrl).credit( value );
}
-
+
public void debit(Control ctrl, float value )
{
getResource(ctrl).debit( value );
}
public AccountResource getResource(Control control)
- {
+ {
try
{
if (accRes == null) {
accRes = new AccountResource(this, _name) ;
- <strong>
+ <strong>
//The invocation on the ORB illustrates the fact that the same
- //ORB instance created by the Bank Server is returned.
+ //ORB instance created by the Bank Server is returned.
ref = org.omg.CosTransactions.ResourceHelper.
narrow(OA.getRootOA(ORB.getInstance("ServerSide")).
corbaReference(accRes));
- RecoveryCoordinator recoverycoordinator =
+ RecoveryCoordinator recoverycoordinator =
control.get_coordinator().register_resource(ref);</strong>
}
}
catch (Exception e){...}
return accRes;
- }
+ }
...
}</pre>
- <p>To be considered as a org.omg.CosTransactions.Resource, the AccountResource
- class shall extends the class org.omg.CosTransactions.ResourcePOA generated
- by the CORBA IDL compiler. The AccountRessource provides similar methods as
- the Account class (credit, withdraw and balance) with the appropriate methods
- to participate to the <a class="linkscoloured" href="part2.html#2pc">2PC protocol</a>. The following portion of code describes
- how the methods <font face="Courier New, Courier, mono">prepare</font>, <font face="Courier New, Courier, mono">commit</font>
+ <p>To be considered as a org.omg.CosTransactions.Resource, the AccountResource
+ class shall extends the class org.omg.CosTransactions.ResourcePOA generated
+ by the CORBA IDL compiler. The AccountRessource provides similar methods as
+ the Account class (credit, withdraw and balance) with the appropriate methods
+ to participate to the <a class="linkscoloured" href="part2.html#2pc">2PC protocol</a>. The following portion of code describes
+ how the methods <font face="Courier New, Courier, mono">prepare</font>, <font face="Courier New, Courier, mono">commit</font>
and <font face="Courier New, Courier, mono">rollback</font> are implemented.</p>
<pre>public class AccountResource <strong>extends org.omg.CosTransactions.ResourcePOA</strong>
@@ -295,24 +295,24 @@
_initial_balance = account._balance;
_current_balance = _initial_balance;
}
-
+
public float balance()
{
return _current_balance;
}
-
+
public void credit( float value )
{
_current_balance += value;
}
-
+
public void debit( float value )
{
_current_balance -= value;
}
-
+
<strong>public org.omg.CosTransactions.Vote prepare()</strong>
- throws org.omg.CosTransactions.HeuristicMixed,
+ throws org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
{
if ( _initial_balance == _current_balance )
@@ -323,41 +323,41 @@
}
<strong>public void rollback()</strong>
- throws org.omg.CosTransactions.HeuristicCommit,
- org.omg.CosTransactions.HeuristicMixed,
+ throws org.omg.CosTransactions.HeuristicCommit,
+ org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
{
- //Nothing to do
+ //Nothing to do
}
-
+
<strong>public void commit()</strong>
- throws org.omg.CosTransactions.NotPrepared,
+ throws org.omg.CosTransactions.NotPrepared,
org.omg.CosTransactions.HeuristicRollback,
- org.omg.CosTransactions.HeuristicMixed,
+ org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
{
- _account._balance = _current_balance;
+ _account._balance = _current_balance;
}
-
+
public void commit_one_phase()
throws org.omg.CosTransactions.HeuristicHazard
{
- _account._balance = _current_balance;
+ _account._balance = _current_balance;
}
.....</pre>
<pre> private float _initial_balance;
private float _current_balance;
private Account _account;
-
+
}
</pre>
<h5>Sample Application Source Code</h5>
- <p>Full source code for the banking application is included to provide you with
+ <p>Full source code for the banking application is included to provide you with
a starting point for experimentation. </p>
<ul>
- <li>JTS Version
+ <li>JTS Version
<ul>
<li>
<a class="linkscoloured" href="../src/com/arjuna/demo/jts/explicitremotebank/Bank.idl">Bank.idl</a>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_implicit.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_implicit.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_implicit.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Trail map: Running and Testing Examples </header>
<content>
<navigation>
@@ -35,17 +35,17 @@
<area title="Running and Testing examples">
<html>
<h4>How the Banking Application is build using JTS interfaces</h4>
- <p>The bank client is an application program able to manage transactions either
- in a direct or indirect management mode, respectively with the interfaces org.omg.CosTransactions.TransactionFactory
- and org.omg.CosTransactions.Terminator or with the org.omg.CosTransactions.Current
- interface. Transactions created by the client in the Banking application are
+ <p>The bank client is an application program able to manage transactions either
+ in a direct or indirect management mode, respectively with the interfaces org.omg.CosTransactions.TransactionFactory
+ and org.omg.CosTransactions.Terminator or with the org.omg.CosTransactions.Current
+ interface. Transactions created by the client in the Banking application are
done in the indirect mode. </p>
- <p>Invoking a remote object within a CORBA environment means that the remote object
- implements a CORBA interface defined in a CORBA idl file. The following Bank.idl
- describes the interfaces then the possible kind of distributed CORBA objects
- involved in the banking application. Only the Account interface inherits the
- CosTransactions::TransactionalObject interface, this means that an Account CORBA
- object is expected to invoked within a scope of transaction and the transactional
+ <p>Invoking a remote object within a CORBA environment means that the remote object
+ implements a CORBA interface defined in a CORBA idl file. The following Bank.idl
+ describes the interfaces then the possible kind of distributed CORBA objects
+ involved in the banking application. Only the Account interface inherits the
+ CosTransactions::TransactionalObject interface, this means that an Account CORBA
+ object is expected to invoked within a scope of transaction and the transactional
context is implicitly propagated.</p>
<pre>
module arjuna {
@@ -59,10 +59,10 @@
void credit( in float value );
void debit( in float value );
};
-
+
exception NotExistingAccount
{ };
-
+
interface Bank
{
Account create_account( in string name );
@@ -74,12 +74,12 @@
};
};</pre>
- <p>The following portion of code illustrates how a JTS transaction is started
- and terminated when the client asks to transfer money from one account to another.
- This also describes what are JBossTS packages that need to be used in order
+ <p>The following portion of code illustrates how a JTS transaction is started
+ and terminated when the client asks to transfer money from one account to another.
+ This also describes what are JBossTS packages that need to be used in order
to obtain appropriate standard JTS API objects instances (such Current).</p>
- <p>Note: The code below is a simplified view of the BankClient.java program. Only
- the transfer operation is illustrated; other operations manage transactions
+ <p>Note: The code below is a simplified view of the BankClient.java program. Only
+ the transfer operation is illustrated; other operations manage transactions
in the same way. (see for details the <a class="linkscoloured" href="../src/com/arjuna/demo/jts/localbank/BankClient.java">BankClient.java</a>)</p>
<pre>
@@ -90,30 +90,30 @@
{
private Bank _bank;
....
- // This operation is used to make a transfer
+ // This operation is used to make a transfer
// from an account to another account
private void makeTransfer()
{
- //get the name of the supplier(name_supplier)
+ //get the name of the supplier(name_supplier)
// and the consumer(name_consumer)
// get the amount to transfer (famount)
...
-
+
try
{
- //the following instruction asks a
- // specific JBossTS class
+ //the following instruction asks a
+ // specific JBossTS class
// to obtain a Current instance
<strong>Current current = OTSManager.get_current(); </strong>
- System.out.println("Beginning a User
+ System.out.println("Beginning a User
transaction to get balance");
<strong>current.begin()</strong>;
-
+
Account supplier = _bank.get_account( name_supplier );
Account consumer = _bank.get_account( name_consumer );
- supplier.debit( famount );
+ supplier.debit( famount );
consumer.credit( famount );
-
+
<strong>current.commit( )</strong>;
}
catch (Exception e)
@@ -121,19 +121,19 @@
...
}
}</pre>
- <p>Since JTS is used invocations against an ORB are needed, such ORB and Object
- Adapter instantiation and initialisation. To ensure a better portability,
- the <a class="linkscoloured" href="../html/JBossTS_ORBPortability.html"> ORB Portability API</a> provides a set of
+ <p>Since JTS is used invocations against an ORB are needed, such ORB and Object
+ Adapter instantiation and initialisation. To ensure a better portability,
+ the <a class="linkscoloured" href="../html/JBossTS_ORBPortability.html"> ORB Portability API</a> provides a set of
methods that can be used as described below. </p>
<pre>public static void main( String [] args )
-{ ....
+{ ....
<strong> myORB = ORB.getInstance("test");
myORB.initORB(args, null); //Initialise the ORB
-
+
</strong>org.omg.CORBA.Object obj = null;
try
- {
- //Read the reference string from
+ {
+ //Read the reference string from
// a file then convert to Object
....
obj = myORB.orb().string_to_object(stringTarget);
@@ -142,23 +142,23 @@
{
...
}
- Bank bank = BankHelper.narrow(obj);
+ Bank bank = BankHelper.narrow(obj);
....
}
</pre>
- <p>The Bank object has mainly two operations: creating an account, which is added
- in the account list, and returning an Account object. No transactional instruction
- is performed by the Bank object. The following lines decribe the implementation
+ <p>The Bank object has mainly two operations: creating an account, which is added
+ in the account list, and returning an Account object. No transactional instruction
+ is performed by the Bank object. The following lines decribe the implementation
of the Bank CORBA object</p>
<pre>public class BankImpl extends BankPOA {
public BankImpl(OA oa)
{
_accounts = new java.util.Hashtable();
- _oa = oa;
+ _oa = oa;
}
-
+
public Account create_account( String name )
{
AccountImpl acc = new AccountImpl(name);
@@ -166,27 +166,27 @@
return com.arjuna.demo.jts.remotebank.AccountHelper.
narrow(_oa.corbaReference(acc));
}
-
+
public Account get_account(String name)
throws NotExistingAccount
{
AccountImpl acc = ( AccountImpl ) _accounts.get( name );
if ( acc == null )
- throw new NotExistingAccount("The Account requested
+ throw new NotExistingAccount("The Account requested
does not exist");
return com.arjuna.demo.jts.remotebank.AccountHelper.
- narrow(_oa.corbaReference(acc));
+ narrow(_oa.corbaReference(acc));
}
private java.util.Hashtable _accounts;
// Accounts created by the Bank
- private OA _oa;
+ private OA _oa;
}</pre>
- <p>After having defined an implementation of the Bank object, we should now create
- an instance and make it available for client requests. This is the role of the
- Bank Server that has the responsibility to create the ORB and the Object Adapater
- instances, then the Bank CORBA object that has its object reference stored in
- a file well known by the bank client. The following lines describe how the Bank
+ <p>After having defined an implementation of the Bank object, we should now create
+ an instance and make it available for client requests. This is the role of the
+ Bank Server that has the responsibility to create the ORB and the Object Adapater
+ instances, then the Bank CORBA object that has its object reference stored in
+ a file well known by the bank client. The following lines describe how the Bank
server is implemented.</p>
<pre>public class BankServer
@@ -203,26 +203,26 @@
myOA.initOA();</strong>
....
<strong>BankImpl bank = new BankImpl(myOA);</strong>
-
+
String reference = <strong>myORB.orb().
object_to_string(myOA.corbaReference(bank))</strong>;
//Store the Object reference in the file
- ...
+ ...
System.out.println("The bank server is now ready...");
<strong>myOA.run();</strong>
}
}</pre>
- <p>The Account object provides mainly three methods <font face="Courier New, Courier, mono">balance</font>,
- <font face="Courier New, Courier, mono">credit</font> and <font face="Courier New, Courier, mono">withdraw</font>.
- However, in order to provide the transactional behaviour, rather than to modify
- the current account directly (according to credit or withdraw) this task is
- delegated to an AccountResource object that is able, according to the transaction
+ <p>The Account object provides mainly three methods <font face="Courier New, Courier, mono">balance</font>,
+ <font face="Courier New, Courier, mono">credit</font> and <font face="Courier New, Courier, mono">withdraw</font>.
+ However, in order to provide the transactional behaviour, rather than to modify
+ the current account directly (according to credit or withdraw) this task is
+ delegated to an AccountResource object that is able, according to the transaction
outcome, to set the account value either to its initial state or its final state.<br/>
- The AccountResource object is in fact an object that implements the org.omg.CosTransactions.Resource,
- then able to participate to the transaction commitment. For this aim, the Account
- object has to register the AccountResource object as a participant, after having
- obtaining the reference of the org.omg.CosTransactions.Coordinator object ,
+ The AccountResource object is in fact an object that implements the org.omg.CosTransactions.Resource,
+ then able to participate to the transaction commitment. For this aim, the Account
+ object has to register the AccountResource object as a participant, after having
+ obtaining the reference of the org.omg.CosTransactions.Coordinator object ,
itself obtained via the org.omg.CosTransactions.Control object</p>
<pre>package com.arjuna.demo.jta.remotebank;
@@ -232,23 +232,23 @@
{
float _balance;
AccountResource accRes = null;
-
+
public Account(String name )
{
_name = name;
_balance = 0;
}
-
+
public float balance()
{
return getResource().balance();;
}
-
+
public void credit( float value )
{
getResource().credit( value );
}
-
+
public void debit( float value )
{
getResource().debit( value );
@@ -258,12 +258,12 @@
public AccountResource getResource()
{
try
- {
+ {
if (accRes == null) {
accRes = new AccountResource(this, _name) ;
- <strong>//The invocation on the ORB illustrates the
- // fact that the same ORB instance created
- // by the Bank Server is returned.
+ <strong>//The invocation on the ORB illustrates the
+ // fact that the same ORB instance created
+ // by the Bank Server is returned.
ref = org.omg.CosTransactions.ResourceHelper.
narrow(OA.getRootOA(ORB.getInstance("ServerSide")).
corbaReference(accRes));
@@ -273,18 +273,18 @@
}
}
catch (Exception e)
- {....}
+ {....}
return accRes;
- }
+ }
...
}</pre>
- <p>To be considered as a org.omg.CosTransactions.Resource, the AccountResource
- class shall extends the class org.omg.CosTransactions.ResourcePOA generated
- by the CORBA IDL compiler. The AccountResource provides similar methods as
- the Account class (credit, withdraw and balance) with the appropriate methods
- to participate to the 2PC protocol. The following portion of code describes
- how the methods <font face="Courier New, Courier, mono">prepare</font>, <font face="Courier New, Courier, mono">commit</font>
+ <p>To be considered as a org.omg.CosTransactions.Resource, the AccountResource
+ class shall extends the class org.omg.CosTransactions.ResourcePOA generated
+ by the CORBA IDL compiler. The AccountResource provides similar methods as
+ the Account class (credit, withdraw and balance) with the appropriate methods
+ to participate to the 2PC protocol. The following portion of code describes
+ how the methods <font face="Courier New, Courier, mono">prepare</font>, <font face="Courier New, Courier, mono">commit</font>
and <font face="Courier New, Courier, mono">rollback</font> are implemented.</p>
<pre>
@@ -298,24 +298,24 @@
_initial_balance = account._balance;
_current_balance = _initial_balance;
}
-
+
public float balance()
{
return _current_balance;
}
-
+
public void credit( float value )
{
_current_balance += value;
}
-
+
public void debit( float value )
{
_current_balance -= value;
}
-
+
<strong>public org.omg.CosTransactions.Vote prepare()</strong>
- throws org.omg.CosTransactions.HeuristicMixed,
+ throws org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
{
if ( _initial_balance == _current_balance )
@@ -326,41 +326,41 @@
}
<strong>public void rollback()</strong>
- throws org.omg.CosTransactions.HeuristicCommit,
- org.omg.CosTransactions.HeuristicMixed,
+ throws org.omg.CosTransactions.HeuristicCommit,
+ org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
{
- //Nothing to do
+ //Nothing to do
}
-
+
<strong>public void commit()</strong>
- throws org.omg.CosTransactions.NotPrepared,
+ throws org.omg.CosTransactions.NotPrepared,
org.omg.CosTransactions.HeuristicRollback,
- org.omg.CosTransactions.HeuristicMixed,
+ org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
{
- _account._balance = _current_balance;
+ _account._balance = _current_balance;
}
-
+
public void commit_one_phase()
throws org.omg.CosTransactions.HeuristicHazard
{
- _account._balance = _current_balance;
+ _account._balance = _current_balance;
}
....
private float _initial_balance;
private float _current_balance;
private Account _account;
-
+
}
</pre>
<h5>Sample Application Source Code</h5>
- <p>Full source code for the banking application is included to provide you with
+ <p>Full source code for the banking application is included to provide you with
a starting point for experimentation. </p>
<ul>
- <li>JTS Version
+ <li>JTS Version
<ul>
<li>
<a class="linkscoloured" href="../src/com/arjuna/demo/jts/remotebank/Bank.idl">Bank.idl</a>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_local.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_local.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_jts_local.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Trail map: Running and Testing Examples </header>
<content>
<navigation>
@@ -35,18 +35,18 @@
<area title="Running and Testing examples">
<html>
<h4>How the Banking Application is build using JTS interfaces</h4>
- <p>From an architectural point of view of JTS, the bank client is considered as
- an application program able to manage transactions either in a <a class="linkscoloured" href="ots_overview.html#program_models">direct or indirect
- management mode</a>, respectively with the interfaces <a class="linkscoloured" href="ots_overview.html#TransactionFactory">org.omg.CosTransactions.TransactionFactory</a>
- and <a class="linkscoloured" href="ots_overview.html#Terminator">org.omg.CosTransactions.Terminator</a> or with the <a class="linkscoloured" href="ots_overview.html#Current">org.omg.CosTransactions.Current</a>
- interface. Transactions created by the client in the Banking application are
+ <p>From an architectural point of view of JTS, the bank client is considered as
+ an application program able to manage transactions either in a <a class="linkscoloured" href="ots_overview.html#program_models">direct or indirect
+ management mode</a>, respectively with the interfaces <a class="linkscoloured" href="ots_overview.html#TransactionFactory">org.omg.CosTransactions.TransactionFactory</a>
+ and <a class="linkscoloured" href="ots_overview.html#Terminator">org.omg.CosTransactions.Terminator</a> or with the <a class="linkscoloured" href="ots_overview.html#Current">org.omg.CosTransactions.Current</a>
+ interface. Transactions created by the client in the Banking application are
done in the indirect mode. </p>
- <p> The following portion of code illustrates how a JTS transaction is started
- and terminated when the client asks to transfer money from one account to another.
- This also describes what are JBossTS packages that need to be used in order
+ <p> The following portion of code illustrates how a JTS transaction is started
+ and terminated when the client asks to transfer money from one account to another.
+ This also describes what are JBossTS packages that need to be used in order
to obtain appropriate objects instances (such Current).</p>
- <p>Note: The code below is a simplified view of the BankClient.java program. Only
- the transfer operation is illustrated; other operations manage transactions
+ <p>Note: The code below is a simplified view of the BankClient.java program. Only
+ the transfer operation is illustrated; other operations manage transactions
in the same way. (see for details the <a href="../src/com/arjuna/demo/jts/localbank/BankClient.java">BankClient.java</a>)</p>
<blockquote>
<pre>
@@ -55,21 +55,21 @@
public class BankClient
{
- private Bank _bank;
+ private Bank _bank;
....
- // This operation is used to make
+ // This operation is used to make
//a transfer from an account to another account
private void makeTransfer()
{
System.out.print("Take money from : ");
String name_supplier = input();
-
+
System.out.print("Put money to : ");
String name_consumer = input();
-
+
System.out.print("Transfert amount : ");
String amount = input();
-
+
float famount = 0;
try
{
@@ -77,25 +77,25 @@
}
catch ( java.lang.Exception ex )
{
- System.out.println("Invalid float number,
+ System.out.println("Invalid float number,
abort operation...");
return;
}
-
+
try
{
- //the following instruction asks a specific
+ //the following instruction asks a specific
// JBossTS class to obtain a Current instance
<strong>Current current = OTSManager.get_current(); </strong>
- System.out.println("Beginning a User
+ System.out.println("Beginning a User
transaction to get balance");
<strong>current.begin()</strong>;
-
+
Account supplier = _bank.get_account( name_supplier );
Account consumer = _bank.get_account( name_consumer );
supplier.debit( famount );
consumer.credit( famount );
-
+
<strong>current.commit( )</strong>;
}
catch (Exception e)
@@ -104,9 +104,9 @@
}
}
</pre>
-<p>Since JTS is used invocations against an ORB are needed, such ORB and Object
- Adapter instantiation and initialisation. To ensure a better portability,
- the <a class="linkscoloured" href="JBossTS_ORBPortability.html"> ORB Portability API</a> provides a set of
+<p>Since JTS is used invocations against an ORB are needed, such ORB and Object
+ Adapter instantiation and initialisation. To ensure a better portability,
+ the <a class="linkscoloured" href="JBossTS_ORBPortability.html"> ORB Portability API</a> provides a set of
methods that can be used as described below. </p>
<pre>
public static void main( String [] args )
@@ -116,7 +116,7 @@
// Create an ORB instance
myORB = ORB.getInstance("test");
//Obtain the Root POA
- myOA = OA.getRootOA(myORB);
+ myOA = OA.getRootOA(myORB);
//Initialise the ORB
myORB.initORB(args, null);
//Initialise the POA
@@ -129,46 +129,46 @@
}
</pre>
</blockquote>
- <p>The Bank object has mainly two operations: creating an account, which is added
- in the account list, and returning an Account object. No transactional instruction
+ <p>The Bank object has mainly two operations: creating an account, which is added
+ in the account list, and returning an Account object. No transactional instruction
is performed by the Bank object</p>
<pre>package com.arjuna.demo.jta.localbank;
public class Bank {
private java.util.Hashtable _accounts;
-
+
public Bank()
{
_accounts = new java.util.Hashtable();
}
-
+
public Account create_account( String name )
{
Account acc = new Account(name);
_accounts.put( name, acc );
return acc;
}
-
+
public Account get_account(String name)
throws NotExistingAccount
{
Account acc = ( Account ) _accounts.get( name );
if ( acc == null )
- throw new NotExistingAccount("The Account
+ throw new NotExistingAccount("The Account
requested does not exist");
return acc;
}
}
</pre>
- <p>The Account object provides mainly three methods <font face="Courier New, Courier, mono">balance</font>,
- <font face="Courier New, Courier, mono">credit</font> and <font face="Courier New, Courier, mono">withdraw</font>.
- However, in order to provide the transactional behaviour, rather than to modify
- the current account directly (according to credit or withdraw) this task is
- delegated to an AccountResource object that is able, according to the transaction
+ <p>The Account object provides mainly three methods <font face="Courier New, Courier, mono">balance</font>,
+ <font face="Courier New, Courier, mono">credit</font> and <font face="Courier New, Courier, mono">withdraw</font>.
+ However, in order to provide the transactional behaviour, rather than to modify
+ the current account directly (according to credit or withdraw) this task is
+ delegated to an AccountResource object that is able, according to the transaction
outcome, to set the account value either to its initial state or its final state.<br/>
- The AccountResource object is in fact an object that implements the <a class="linkscoloured" href="ots_overview.html#Resource">org.omg.CosTransactions.Resource</a>,
- then able to participate to the transaction commitment. For this aim, the Account
- object has to register the AccountResource object as a participant, after having
- obtaining the reference of the <a class="linkscoloured" href="ots_overview.html#Coordinator">org.omg.CosTransactions.Coordinator</a> object ,
+ The AccountResource object is in fact an object that implements the <a class="linkscoloured" href="ots_overview.html#Resource">org.omg.CosTransactions.Resource</a>,
+ then able to participate to the transaction commitment. For this aim, the Account
+ object has to register the AccountResource object as a participant, after having
+ obtaining the reference of the <a class="linkscoloured" href="ots_overview.html#Coordinator">org.omg.CosTransactions.Coordinator</a> object ,
itself obtained via the <a class="linkscoloured" href="ots_overview.html#Control">org.omg.CosTransactions.Control</a> object</p>
<pre>
@@ -178,23 +178,23 @@
{
float _balance;
AccountResource accRes = null;
-
+
public Account(String name )
{
_name = name;
_balance = 0;
}
-
+
public float balance()
{
return getResource().balance();;
}
-
+
public void credit( float value )
{
getResource().credit( value );
}
-
+
public void debit( float value )
{
getResource().debit( value );
@@ -205,7 +205,7 @@
try
{
if (accRes == null) {
- accRes = new AccountResource(this, _name) ;
+ accRes = new AccountResource(this, _name) ;
<strong>Resource ref = org.omg.CosTransactions.ResourceHelper.
narrow(OA.getRootOA(ORB.getInstance("test")).corbaReference(accRes));</strong>
<strong>RecoveryCoordinator recoverycoordinator = OTSManager.get_current().
@@ -215,16 +215,16 @@
catch (Exception e)
{...}
return accRes;
- }
+ }
...
}</pre>
- <p>To be considered as a org.omg.CosTransactions.Resource, the AccountResource
- class shall extends the class org.omg.CosTransactions.ResourcePOA generated
- by the CORBA IDL compiler. The AccountRessource provides similar methods as
- the Account class (credit, withdraw and balance) with the appropriate methods
- to participate to the <a class="linkscoloured" href="part2.html#2pc">2PC protocol</a>. The following portion of code describes
- how the methods <font face="Courier New, Courier, mono">prepare</font>, <font face="Courier New, Courier, mono">commit</font>
+ <p>To be considered as a org.omg.CosTransactions.Resource, the AccountResource
+ class shall extends the class org.omg.CosTransactions.ResourcePOA generated
+ by the CORBA IDL compiler. The AccountRessource provides similar methods as
+ the Account class (credit, withdraw and balance) with the appropriate methods
+ to participate to the <a class="linkscoloured" href="part2.html#2pc">2PC protocol</a>. The following portion of code describes
+ how the methods <font face="Courier New, Courier, mono">prepare</font>, <font face="Courier New, Courier, mono">commit</font>
and <font face="Courier New, Courier, mono">rollback</font> are implemented.</p>
<pre>
@@ -237,62 +237,62 @@
_initial_balance = account._balance;
_current_balance = _initial_balance;
}
-
+
public float balance()
{
return _current_balance;
}
-
+
public void credit( float value )
{
_current_balance += value;
}
-
+
public void debit( float value )
{
_current_balance -= value;
}
-
+
<strong>public org.omg.CosTransactions.Vote prepare() </strong>
- throws org.omg.CosTransactions.HeuristicMixed,
+ throws org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard<br/> {<br/> if ( _initial_balance == _current_balance )<br/> return org.omg.CosTransactions.Vote.VoteReadOnly;<br/> if ( _current_balance < 0 )
return org.omg.CosTransactions.Vote.VoteRollback;<br/> return org.omg.CosTransactions.Vote.VoteCommit;<br/> }
<strong>public void rollback()</strong>
- throws org.omg.CosTransactions.HeuristicCommit,
- org.omg.CosTransactions.HeuristicMixed,
+ throws org.omg.CosTransactions.HeuristicCommit,
+ org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
{
- //Nothing to do
+ //Nothing to do
}
-
+
<strong>public void commit()</strong>
- throws org.omg.CosTransactions.NotPrepared,
+ throws org.omg.CosTransactions.NotPrepared,
org.omg.CosTransactions.HeuristicRollback,
- org.omg.CosTransactions.HeuristicMixed,
+ org.omg.CosTransactions.HeuristicMixed,
org.omg.CosTransactions.HeuristicHazard
{
- _account._balance = _current_balance;
+ _account._balance = _current_balance;
}
-
+
public void commit_one_phase()
throws org.omg.CosTransactions.HeuristicHazard
{
- _account._balance = _current_balance;
+ _account._balance = _current_balance;
}
- .....
+ .....
private float _initial_balance;
private float _current_balance;
private Account _account;
-
+
}
</pre>
<h5>Sample Application Source Code</h5>
- <p>Full source code for the banking application is included to provide you with
+ <p>Full source code for the banking application is included to provide you with
a starting point for experimentation. </p>
<ul>
- <li>JTS Version
+ <li>JTS Version
<ul>
<li>
<a class="linkscoloured" href="../src/com/arjuna/demo/jts/localbank/BankClient.java">BankClient.java</a>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jta.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jta.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jta.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="JBoss (a Division of Redhat): Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Trail map: Running and Testing Examples </header>
<content>
<navigation>
@@ -34,17 +34,17 @@
</navigation>
<area title="Running The Banking application with JTA">
<html>
- <h4>Configuring ATS</h4>
- <p>Program Applications that create transactions using te JTA interface may invoke as well local services as remote
-services. When a remote invocation need to be performed, the current transactional context need to be propagated
-to the remote service in order to involve it to the transaction in progress. JBoss Transaction Service allows the
-possibility to provide such feature using the facilities provided by JTS and ORB. More precisely ATS need to be configured
+ <h4>Configuring JBossTS</h4>
+ <p>Program Applications that create transactions using te JTA interface may invoke as well local services as remote
+services. When a remote invocation need to be performed, the current transactional context need to be propagated
+to the remote service in order to involve it to the transaction in progress. JBoss Transaction Service allows the
+possibility to provide such feature using the facilities provided by JTS and ORB. More precisely JBossTS need to be configured
to determine in which type of transaction, local or distributed, the JTA interface is used.
</p>
<h4>Executing the JTA sample</h4>
The Banking sample using JTA creates local transactions, ensure that JTA is configured for local transactions as explained above.
-<p>To launch the <a class="linkscoloured" href="part5_jta.html">JTA version of the Banking application</a>,
+<p>To launch the <a class="linkscoloured" href="part5_jta.html">JTA version of the Banking application</a>,
which creates only local transactions, execute the following java program: </p>
<blockquote>
<pre>
@@ -64,16 +64,16 @@
3. Make a transfer.
4. Credit an account.
5. Withdraw from an account
-
+
Your choice :
</pre>
</blockquote>
-<p>After introducing your choice, the appropriate operation is performed by the
- Bank object, to get the requested account, and by the account to execute the
- credit or withdraw or to return the current balance. Let's consider the following
+<p>After introducing your choice, the appropriate operation is performed by the
+ Bank object, to get the requested account, and by the account to execute the
+ credit or withdraw or to return the current balance. Let's consider the following
execution. </p>
-<p>Enter the number 1 as your choice, then give the name "Foo" as the
- account name and "1000" as an initial value of the account to create.
+<p>Enter the number 1 as your choice, then give the name "Foo" as the
+ account name and "1000" as an initial value of the account to create.
You should get the following lines:</p>
<blockquote>
<pre>Your choice : 1
@@ -89,21 +89,21 @@
</pre>
</blockquote>
<ul>
- <li>The line XA_START indicates that the AccountResource object that implements
- the XAResource interface and enlisted to participate in the account creation
- transaction, receives the indication from the Transaction Manager that the
+ <li>The line XA_START indicates that the AccountResource object that implements
+ the XAResource interface and enlisted to participate in the account creation
+ transaction, receives the indication from the Transaction Manager that the
transaction has started.</li>
- <li>The line XA_END indicates that the calling thread in which the AccountRessource
- object is associated shall be ended to enable the transaction completion as
+ <li>The line XA_END indicates that the calling thread in which the AccountRessource
+ object is associated shall be ended to enable the transaction completion as
recommended by the X/Open specification.</li>
- <li>Since only one AccountResource then only one XAResource is involved in the
- account creation transaction, the two phases needed to get a consensus in
- the 2PC protocol are not mandatory. The one phase commit optimization, indicated
+ <li>Since only one AccountResource then only one XAResource is involved in the
+ account creation transaction, the two phases needed to get a consensus in
+ the 2PC protocol are not mandatory. The one phase commit optimization, indicated
by the "XA_COMMIT (ONE_PHASE)", is applied. </li>
</ul>
- <p>In the same way create a second account with the name "Bar" and the
+ <p>In the same way create a second account with the name "Bar" and the
initial balance set to 500. </p>
- <p>As a choice now, enter "3" to make a transfer (300) from "Foo"
+ <p>As a choice now, enter "3" to make a transfer (300) from "Foo"
to "Bar". </p>
<blockquote>
<pre>Your choice : 3
@@ -124,12 +124,12 @@
</pre>
</blockquote>
<ul>
- <li>Now two AccountResource objects, then two XAResource objects are enlisted
- with the transaction. The displayed lines show that the two phases, prepare
+ <li>Now two AccountResource objects, then two XAResource objects are enlisted
+ with the transaction. The displayed lines show that the two phases, prepare
and commit, are applied. </li>
</ul>
- <p>Any attempt to manipulate an account that it doesn't exist leads to throw the
- NotExistingAccount exception and to rollback the transaction in progress. For
+ <p>Any attempt to manipulate an account that it doesn't exist leads to throw the
+ NotExistingAccount exception and to rollback the transaction in progress. For
instance, let's withdraw money from an account FooBar not previously created.</p>
<blockquote>
<pre>Your choice : 5
@@ -137,7 +137,7 @@
----------------------------
Give the Account name : FooBar
Amount to withdraw : 200
-Beginning a User transaction to
+Beginning a User transaction to
withdraw from an account
The requested account does not exist!
ERROR - javax.transaction.RollbackException
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jts.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jts.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jts.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Trail map: Running and Testing Examples </header>
<content>
<navigation>
@@ -35,22 +35,22 @@
<area title="Running The Banking application with JTS">
<html>
-<p>The JTS version of the Banking application means that the Object Request Broker
- will be used. The JBossTS distribution is provided to works with JacORB version
- 2.1 that can be obtained from the arjuna product page. JBossTS works also
- with Orbix 2000 v2.0, for more details see the ORB configuration section of the
+<p>The JTS version of the Banking application means that the Object Request Broker
+ will be used. The JBossTS distribution is provided to works with JacORB version
+ 2.1 that can be obtained from the arjuna product page. JBossTS works also
+ with Orbix 2000 v2.0, for more details see the ORB configuration section of the
<a class="linkscoloured" href="../../docs/user_guide/ProgrammersGuide.pdf" target="_blank">Programmers Guide (pdf)</a>
</p>
-<p>To describe the possibilities provided by JBossTS to build a transactional
- application according to the programming models defined by the OTS specification,
+<p>To describe the possibilities provided by JBossTS to build a transactional
+ application according to the programming models defined by the OTS specification,
the Banking Application is programmed in different ways. </p>
<ul>
- <li>Local transactions: The Bank Client and the Bank server are collocated in
+ <li>Local transactions: The Bank Client and the Bank server are collocated in
the same process.</li>
- <li>Distributed Transactions: The Bank Client and the Bank Server and located
- on different process. To participate within a client's transaction, Account
- Objects needed to access the transactional context. We describe the two of
- context propagation.
+ <li>Distributed Transactions: The Bank Client and the Bank Server and located
+ on different process. To participate within a client's transaction, Account
+ Objects needed to access the transactional context. We describe the two of
+ context propagation.
<ul>
<li>implicit context propagation, and</li>
<li>explicit context propagation. </li>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jtsDistributed.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jtsDistributed.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jtsDistributed.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="JBoss (a Division of Redhat): Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Trail map: Running and Testing Examples </header>
<content>
<navigation>
@@ -34,8 +34,8 @@
</navigation>
<area title="Running The Banking application with JTS">
<html>
- <p>The JTS version of the Banking application means that the Object Request Broker
- will be used. The JBossTS distribution is provided to works with JacOrb version
+ <p>The JTS version of the Banking application means that the Object Request Broker
+ will be used. The JBossTS distribution is provided to works with JacOrb version
2.1 that can be obtained from the same download location as JBossTS.</p>
<p>
<strong>Note</strong>: Ensure that the jacorb jar files are added in your CLASSPATH</p>
@@ -45,7 +45,7 @@
<blockquote>
<pre>java com.arjuna.ats.arjuna.recovery.RecoveryManager</pre>
</blockquote>
-
+
<ol>
<li><b>Testing the distributed transaction with <a class="linkscoloured" href="part5_jts_implicit.html"><b>Implicit Propagation Context</b></a></b>
</li>
@@ -98,23 +98,23 @@
<br/>
Your choice :</font>
</blockquote>
- <p>After entering your choice, the appropriate operation is performed by the
- remote Bank object, to get the requested account, and by the account to execute
+ <p>After entering your choice, the appropriate operation is performed by the
+ remote Bank object, to get the requested account, and by the account to execute
the credit or withdraw or to return the current balance. Let's consider the following execution. </p>
- <p>Enter the number 1 as your choice, then give the name "Foo" as the
- account name and "1000" as an initial value of the account to create.
+ <p>Enter the number 1 as your choice, then give the name "Foo" as the
+ account name and "1000" as an initial value of the account to create.
You should get in the server window a result that terminates with the following line</p>
<blockquote>
<font face="Courier New, Courier, mono">[ Resource for Foo : Commit one phase ]</font>
</blockquote>
<ul>
- <li>Since only one AccountResource then only one CosTransaction.Resource is
- involved in the account creation transaction, the two phases needed to get
- a consensus in the 2PC protocol are not mandatory. The one phase commit optimisation,
+ <li>Since only one AccountResource then only one CosTransaction.Resource is
+ involved in the account creation transaction, the two phases needed to get
+ a consensus in the 2PC protocol are not mandatory. The one phase commit optimisation,
indicated by the "Commit one phase", is applied. </li>
</ul>
<p>In the same way create a second account with the name "Bar" and the initial balance set to 500. </p>
- <p>As a choice now, enter in the client window "3" to make a transfer
+ <p>As a choice now, enter in the client window "3" to make a transfer
(300) from "Foo" to "Bar". </p>
<blockquote>
<font face="Courier New, Courier, mono">Your choice : 3<br/>
@@ -133,10 +133,10 @@
[ Resource for Bar : Commit ]</font>
</blockquote>
<ul>
- <li>Now two AccountResource objects, then two CosTransactions.Resource objects are enlisted with the transaction. The
+ <li>Now two AccountResource objects, then two CosTransactions.Resource objects are enlisted with the transaction. The
displayed lines show that the two phases, prepare and commit, are applied. </li>
</ul>
- <p>Any attempt to manipulate an account that it doesn't exist leads to throw the NotExistingAccount exception and to rollback
+ <p>Any attempt to manipulate an account that it doesn't exist leads to throw the NotExistingAccount exception and to rollback
the transaction in progress. For instance, let's withdraw money from an account FooBar not previously created.</p>
<blockquote>
<font face="Courier New, Courier, mono">Your choice : 5<br/>
@@ -149,10 +149,10 @@
minor code: 50001 completed: No</font>
</blockquote>
<h4>Using a stand-alone Transaction Server</h4>
- <p>By default JBossTS does not use a separate transaction manager server: transaction
- managers are co-located with each application process to improve performance
- and improve application fault-tolerance. When running applications which require
- a separate transaction manager, you must set the com.arjuna.ats.jts.transactionManager
+ <p>By default JBossTS does not use a separate transaction manager server: transaction
+ managers are co-located with each application process to improve performance
+ and improve application fault-tolerance. When running applications which require
+ a separate transaction manager, you must set the com.arjuna.ats.jts.transactionManager
property variable, in the arjunajts-properties.xml file, to YES. </p>
<p>In a separate window, the stand-alone Transaction Server is launched as follow:</p>
<blockquote>
@@ -168,11 +168,11 @@
It is possible to run the JBoss Transaction Service and recovery manager processes on a different machine and have clients access these
centralized services in a hub-and-spoke style architecture.</p>
<p>
- All that must be done is to provide the clients with enough information to contact the transaction service (such as the ORB's NameService).
+ All that must be done is to provide the clients with enough information to contact the transaction service (such as the ORB's NameService).
However, configuring the ORB is beyond the remit of this trailmap and so we shall opt for a simpler mechanism wherby the transaction services
IOR is shared by access to a common file.</p>
<p>
- This trailmap stage assumes that the transaction service has been appropriately installed and configured (the
+ This trailmap stage assumes that the transaction service has been appropriately installed and configured (the
<font face="Courier New, Courier, mono">setenv.[bat|sh]</font> script has been ran) onto two hosts (for the purpose of explanation we shall
refer to these hosts as <font face="Courier New, Courier, mono">host1</font> and <font face="Courier New, Courier, mono">host2</font>).</p>
<ol>
@@ -194,7 +194,7 @@
<ol start="2">
<li>Share the transaction service IOR on <font face="Courier New, Courier, mono">host1</font> with <font face="Courier New, Courier, mono">host2</font></li>
<p>
- Open a command prompt on <font face="Courier New, Courier, mono">host2</font> and copy the <font face="Courier New, Courier, mono">CosServices.cfg</font> file
+ Open a command prompt on <font face="Courier New, Courier, mono">host2</font> and copy the <font face="Courier New, Courier, mono">CosServices.cfg</font> file
from the <font face="Courier New, Courier, mono"><arjunajts_install_root>/etc</font> directory on <font face="Courier New, Courier, mono">host1</font>.</p>
<p>
For example, using the popular <font face="Courier New, Courier, mono">scp</font> package, open a shell prompt and issue the following command:</p>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jtsLocal.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jtsLocal.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part5_testing_jtsLocal.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Trail map: Running and Testing Examples </header>
<content>
<navigation>
@@ -34,20 +34,20 @@
</navigation>
<area title="Running The Banking application with JTS">
<html>
- <p>The JTS version of the Banking application means that the Object Request Broker
- will be used. The JBossTS distribution is provided to works with JacOrb version
+ <p>The JTS version of the Banking application means that the Object Request Broker
+ will be used. The JBossTS distribution is provided to works with JacOrb version
2.1 that can be obtained from the same download location as JBossTS.</p>
<p>
<strong>Note</strong>: Ensure that the jacorb jar files are added in your CLASSPATH</p>
-
- <p>To launch the <a class="linkscoloured" href="part5_jts_local.html">JTS version of the Banking application</a>,
+
+ <p>To launch the <a class="linkscoloured" href="part5_jts_local.html">JTS version of the Banking application</a>,
execute the following java program</p>
<blockquote>
<pre>java com.arjuna.demo.jts.localbank.BankClient</pre>
</blockquote>
<p>Once one of the program given above is launched the following lines are displayed:</p>
<blockquote>
- <pre>
+ <pre>
-------------------------------------------------
Bank client
-------------------------------------------------
@@ -62,12 +62,12 @@
Your choice :
</pre>
</blockquote>
- <p>After introducing your choice, the appropriate operation is performed by the
- Bank object, to get the requested account, and by the account to execute the
- credit or withdraw or to return the current balance. Let's consider the following
+ <p>After introducing your choice, the appropriate operation is performed by the
+ Bank object, to get the requested account, and by the account to execute the
+ credit or withdraw or to return the current balance. Let's consider the following
execution. </p>
- <p>Enter the number 1 as your choice, then give the name "Foo" as the
- account name and "1000" as an initial value of the account to create.
+ <p>Enter the number 1 as your choice, then give the name "Foo" as the
+ account name and "1000" as an initial value of the account to create.
You should get the following lines:</p>
<blockquote>
<pre>
@@ -82,14 +82,14 @@
</pre>
</blockquote>
<ul>
- <li>Since only one AccountResource then only one CosTransaction.Resource is
- involved in the account creation transaction, the two phases needed to get
- a consensus in the 2PC protocol are not mandatory. The one phase commit optimisation,
+ <li>Since only one AccountResource then only one CosTransaction.Resource is
+ involved in the account creation transaction, the two phases needed to get
+ a consensus in the 2PC protocol are not mandatory. The one phase commit optimisation,
indicated by the "Commit one phase", is applied. </li>
</ul>
- <p>In the same way create a second account with the name "Bar" and the
+ <p>In the same way create a second account with the name "Bar" and the
initial balance set to 500. </p>
- <p>As a choice now, enter "3" to make a transfer (300) from "Foo"
+ <p>As a choice now, enter "3" to make a transfer (300) from "Foo"
to "Bar". </p>
<blockquote>
<pre>
@@ -108,12 +108,12 @@
</pre>
</blockquote>
<ul>
- <li>Now two AccountResource objects, then two CosTransactions.Resource objects
- are enlisted with the transaction. The displayed lines show that the two phases,
+ <li>Now two AccountResource objects, then two CosTransactions.Resource objects
+ are enlisted with the transaction. The displayed lines show that the two phases,
prepare and commit, are applied. </li>
</ul>
- <p>Any attempt to manipulate an account that it doesn't exist leads to throw the
- NotExistingAccount exception and to rollback the transaction in progress. For
+ <p>Any attempt to manipulate an account that it doesn't exist leads to throw the
+ NotExistingAccount exception and to rollback the transaction in progress. For
instance, let's withdraw money from an account FooBar not previously created.</p>
<blockquote>
<pre>
@@ -124,15 +124,15 @@
Amount to withdraw : 200
Beginning a User transaction to withdraw from an account
The requested account does not exist!
-ERROR - org.omg.CORBA.TRANSACTION_ROLLEDBACK:
+ERROR - org.omg.CORBA.TRANSACTION_ROLLEDBACK:
minor code: 50001 completed: No
</pre>
</blockquote>
<h4>Using a stand-alone Transaction Server</h4>
- <p>By default JBossTS does not use a separate transaction manager server: transaction
- managers are co-located with each application process to improve performance
- and improve application fault-tolerance. When running applications which require
- a separate transaction manager, you must set the com.arjuna.ats.jts.transactionManager
+ <p>By default JBossTS does not use a separate transaction manager server: transaction
+ managers are co-located with each application process to improve performance
+ and improve application fault-tolerance. When running applications which require
+ a separate transaction manager, you must set the com.arjuna.ats.jts.transactionManager
property variable, in the "(ats_install_dir)/etc/arjunajts-properties.xml file, to YES. </p>
<p>In a separate window, the stand-alone Transaction Server is launched as follow:</p>
<blockquote>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,12 +16,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
<page
- title="JBoss (a Division of Redhat): Trail map: Running and Testing Examples"
+ title="JBossTS Trail map: Running and Testing Examples"
rootpath="../..">
<header>Making the Banking Application Persistent</header>
<content>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_jdbc_banking.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_jdbc_banking.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_jdbc_banking.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Making the Banking Application Persistent </header>
<content>
<navigation>
@@ -35,17 +35,17 @@
</navigation>
<area title="The banking application as a relational database accessed with JDBC">
<html>
- <p>In regards to the its structure in the previous trails, the banking application
- described here has been slightly simplified. In this version creating local
- JTA transactions, accounts managed by a bank object are in fact instances or
- tuples within a SQL relational table named "accounts". When the Bank
- object is requested for instance to create an account or to get information
- on an account, the Bank object performs SQL statement such SQL INSERT or SQL
+ <p>In regards to the its structure in the previous trails, the banking application
+ described here has been slightly simplified. In this version creating local
+ JTA transactions, accounts managed by a bank object are in fact instances or
+ tuples within a SQL relational table named "accounts". When the Bank
+ object is requested for instance to create an account or to get information
+ on an account, the Bank object performs SQL statement such SQL INSERT or SQL
SELECT.</p>
<h4>Deploy the application</h4>
<p>Executing the demonstration consists to launch the folowing program</p>
<pre>
- <font face="Courier New, Courier, mono">java com.arjuna.demo.jta.jdbcbank.BankClient -host <hostName>
+ <font face="Courier New, Courier, mono">java com.arjuna.demo.jta.jdbcbank.BankClient -host <hostName>
-port portNumber -username <userName> -dbName <DBName>
-password <password> -clean|-create</font>
</pre>
@@ -58,28 +58,28 @@
<li>clean - the existing relational table will be deleted then created</li>
<li>create - a new relational table will be created</li>
</ul>
-
-<p><i>Note</i> Due to an issue with Oracle, it is possible that an XA exception is thrown when attempting to perform this test (see Release Notes).
-If an xa error is returned you can use the following property property <i>com.arjuna.ats.jdbc.isolationLevel </i> set to <i>TRANSACTION_READ_COMMITTED</i>.<br/>
-This property can be added in previous command as follow:
+
+<p><i>Note</i> Due to an issue with Oracle, it is possible that an XA exception is thrown when attempting to perform this test (see Release Notes).
+If an xa error is returned you can use the following property property <i>com.arjuna.ats.jdbc.isolationLevel </i> set to <i>TRANSACTION_READ_COMMITTED</i>.<br/>
+This property can be added in previous command as follow:
</p>
<pre>
-<font face="Courier New, Courier, mono">java -Dcom.arjuna.ats.jdbc.isolationLevel=TRANSACTION_READ_COMMITTED
- com.arjuna.demo.jta.jdbcbank.BankClient -host <hostName>
- -port portNumber -userName <userName>
+<font face="Courier New, Courier, mono">java -Dcom.arjuna.ats.jdbc.isolationLevel=TRANSACTION_READ_COMMITTED
+ com.arjuna.demo.jta.jdbcbank.BankClient -host <hostName>
+ -port portNumber -userName <userName>
-password <password> -clean|-create</font>
</pre>
-
+
<h4>How JDBC is used</h4>
-<p>The following Banking application illustrates some methods that use the JDBC API. In this application, the way
- to create a jdbc connection is made via an XADataSource obtained with JNDI operations, es explained in the previous
+<p>The following Banking application illustrates some methods that use the JDBC API. In this application, the way
+ to create a jdbc connection is made via an XADataSource obtained with JNDI operations, es explained in the previous
trail <a class="linkscoloured" href="part6_jdbc_banking.html">jdbc introduction</a>
- The BankClient class instantiates an XADataSource and bind it to a jndi naming in order to be retrieved to create
+ The BankClient class instantiates an XADataSource and bind it to a jndi naming in order to be retrieved to create
transactional connections. <b/>
- This portion of code illustrates how this made against oracle (tested on version 9i). A similar code could tested
- against an other database by providng the appropriate XADataSource implementation. Details of the BankClient class
+ This portion of code illustrates how this made against oracle (tested on version 9i). A similar code could tested
+ against an other database by providng the appropriate XADataSource implementation. Details of the BankClient class
can be found in the file <a class="linkscoloured" href="../src/com/arjuna/demo/jta/jdbcbank/BankClient.java">BankClient.java</a>
<pre>
package com.arjuna.demo.jta.jdbcbank;
@@ -110,7 +110,7 @@
....
}
- try
+ try
{
// create DataSource
OracleXADataSource ds = new OracleXADataSource();
@@ -124,27 +124,27 @@
InitialContext ctx = new InitialContext(env);
ctx.rebind("jdbc/DB", ds);
}
- catch (Exception ex)
+ catch (Exception ex)
{ }
//Set the jndi information to be user by the Arjuna JDBC Property Manager
jdbcPropertyManager.propertyManager.setProperty("Context.INITIAL_CONTEXT_FACTORY",
"com.sun.jndi.fscontext.RefFSContextFactory");
jdbcPropertyManager.propertyManager.setProperty("Context.PROVIDER_URL",
"file:/tmp/JNDI");
-
+
Bank bank = new Bank();
BankClient client = new BankClient(bank);
-
+
}
</pre>
-
+
</p>
<p>
- While the BankClient class is responsible to obtain information to access the database, tocreate the XADataSource
+ While the BankClient class is responsible to obtain information to access the database, tocreate the XADataSource
and bind it to jndi, and also to get order from a user (create_account, debit, transfer, ..), the Bank class is resposnible
to create jdbc connections to perform user's requests. The Bank class is illustarted below where. All
- methods are not illusrated here but have a similar behavior; they could be found in
- details in the <a class="linkscoloured" href="../src/com/arjuna/demo/jta/jdbcbank/Bank.java">Bank.java</a>
+ methods are not illusrated here but have a similar behavior; they could be found in
+ details in the <a class="linkscoloured" href="../src/com/arjuna/demo/jta/jdbcbank/Bank.java">Bank.java</a>
program. Note that for simplicity, much error checking code has been removed.</p>
<pre>public Bank()
{
@@ -162,19 +162,19 @@
e.printStackTrace();
System.exit(0);
}
-
+
_accounts = new java.util.Hashtable();
reuseConnection = true;
}
-
+
public void create_account( String _name, float _value )
{
- try
+ try
{
Connection conne = arjunaJDBC2Driver.connect("jdbc:arjuna:jdbc/DB", dbProperties);
Statement stmtx = conne.createStatement(); // tx statement
stmtx.executeUpdate
- ("INSERT INTO accounts (name, value)
+ ("INSERT INTO accounts (name, value)
VALUES ('"+_name+"',"+_value+")");
}
catch (SQLException e)
@@ -182,17 +182,17 @@
e.printStackTrace();
}
}
-
+
public float get_balance(String _name)
throws NotExistingAccount
{
float theBalance = 0;
- try
+ try
{
Connection conne = arjunaJDBC2Driver.connect("jdbc:arjuna:jdbc/DB", dbProperties);
- Statement stmtx = conne.createStatement(); // tx statement
+ Statement stmtx = conne.createStatement(); // tx statement
ResultSet rs = stmtx.executeQuery
- ("SELECT value from accounts
+ ("SELECT value from accounts
WHERE name = '"+_name+"'");
while (rs.next()) {
theBalance = rs.getFloat("value");
@@ -205,13 +205,13 @@
}
return theBalance;
}
-
+
...
}
</pre>
<h4>Note</h4>
- <p>Although, this version of the banking application creates JTA local transactions,
- the way to manipulate JDBC API and the associated ArjunaTA mechanisms in the
+ <p>Although, this version of the banking application creates JTA local transactions,
+ the way to manipulate JDBC API and the associated ArjunaTA mechanisms in the
case of distributed transactions is the same.</p>
</html>
</area>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_jdbc_introduction.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_jdbc_introduction.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_jdbc_introduction.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Making the Banking Application Persistent </header>
<content>
<navigation>
@@ -35,73 +35,73 @@
</navigation>
<area title="Developing applications with JDBC and ArjunaJTS">
<html>
- <p>ArjunaJTS supports the construction of both local and distributed transactional
- applications which access databases using the JDBC 2.0 APIs. JDBC 2.0 supports
- two-phase commit of transactions, and is similar to the XA X/Open standard.
- The JDBC 2.0 support is found in the com.arjuna.ats.jdbc package.</p>
+ <p>ArjunaJTS supports the construction of both local and distributed transactional
+ applications which access databases using the JDBC APIs. JDBC supports
+ two-phase commit of transactions, and is similar to the XA X/Open standard.
+ The JDBC support is found in the com.arjuna.ats.jdbc package.</p>
<h4>Transactional Driver</h4>
- <p>The ArjunaJTS approach to incorporating JDBC connections within transactions
- is to provide transactional JDBC drivers through which all interactions occur.
- These drivers intercept all invocations and ensure that they are registered
- with, and driven by, appropriate transactions. There is a single type of transactional
- driver through which any JDBC driver can be driven; obviously if the database
- is not transactional then ACID properties cannot be guaranteed. This driver
- is com.arjuna.ats.jdbc.TransactionalDriver, which implements the java.sql.Driver
+ <p>The ArjunaJTS approach to incorporating JDBC connections within transactions
+ is to provide transactional JDBC drivers through which all interactions occur.
+ These drivers intercept all invocations and ensure that they are registered
+ with, and driven by, appropriate transactions. There is a single type of transactional
+ driver through which any JDBC driver can be driven; obviously if the database
+ is not transactional then ACID properties cannot be guaranteed. This driver
+ is com.arjuna.ats.jdbc.TransactionalDriver, which implements the java.sql.Driver
interface.</p>
- <p>The driver may be directly instantiated and used within an application. For
+ <p>The driver may be directly instantiated and used within an application. For
example:</p>
<pre> TransactionalDriver arjunaJDBC2Driver = new TransactionalDriver(); </pre>
- <p>It can be registered with the JDBC driver manager (java.sql.DriverManager)
- by adding them to the Java system properties. The jdbc.drivers property contains
- a list of driver class names, separated by colons, that are loaded by the JDBC
+ <p>It can be registered with the JDBC driver manager (java.sql.DriverManager)
+ by adding them to the Java system properties. The jdbc.drivers property contains
+ a list of driver class names, separated by colons, that are loaded by the JDBC
driver manager when it is initialised, for instance:</p>
-
+
<pre>jdbc.drivers=foo.bar.Driver:mydata.sql.Driver:bar.test.myDriver</pre>
- <p> On running an application, it is the DriverManager's responsibility to load
- all the drivers found in the system property jdbc.drivers. For example, this
- is where the driver for the Oracle database may be defined. When opening a connection
- to a database it is the DriverManager' s role to choose the most appropriate
+ <p> On running an application, it is the DriverManager's responsibility to load
+ all the drivers found in the system property jdbc.drivers. For example, this
+ is where the driver for the Oracle database may be defined. When opening a connection
+ to a database it is the DriverManager' s role to choose the most appropriate
driver from the previously loaded drivers. </p>
- <p> A program can also explicitly load JDBC drivers at any time. For example,
+ <p> A program can also explicitly load JDBC drivers at any time. For example,
the my.sql.Driver is loaded with the following statement: </p>
<pre>Class.forName("my.sql.Driver"); </pre>
- <p>Calling Class.forName() will automatically register the driver with the JDBC
- driver manager. It is also possible to explicitly create an instance of the
- JDBC driver using the registerDriver method of the DriverManager. This is the
+ <p>Calling Class.forName() will automatically register the driver with the JDBC
+ driver manager. It is also possible to explicitly create an instance of the
+ JDBC driver using the registerDriver method of the DriverManager. This is the
case for instance for the TransactionalDriver that can be registered as follow:</p>
-<pre>TransactionalDriver arjunaJDBC2Driver = new TransactionalDriver();
+<pre>TransactionalDriver arjunaJDBC2Driver = new TransactionalDriver();
DriverManager.registerDriver(arjunaJDBC2Driver);</pre>
- <p> When you have loaded a driver, it is available for making a connection with
+ <p> When you have loaded a driver, it is available for making a connection with
a DBMS.</p>
<h4>Making Connections</h4>
- <p>Once a driver is loaded and ready for a connection to be made, instances of
- a Connection class can be created using the getConnection method on the DriverManager,
+ <p>Once a driver is loaded and ready for a connection to be made, instances of
+ a Connection class can be created using the getConnection method on the DriverManager,
as follow:</p>
<pre>Connection con = DriverManager.getConnection(url, username, password);</pre>
- <p>From its version 2.0, the JDBC API has introduced a new way to obtain instances
- of the Connection class. This is the case of the interfaces DataSource and XADataSource
- that creates transactional connections. When using a JDBC 2.0 driver, ArjunaTA
- will use the appropriate DataSource whenever a connection to the database is
- made. It will then obtain XAResources and register them with the transaction
- via the JTA interfaces. It is these XAResources which the transaction service
- will use when the transaction terminates in order to drive the database to either
+ <p>From its version 2.0, the JDBC API has introduced a new way to obtain instances
+ of the Connection class. This is the case of the interfaces DataSource and XADataSource
+ that creates transactional connections. When using a JDBC 2.0 driver, ArjunaTA
+ will use the appropriate DataSource whenever a connection to the database is
+ made. It will then obtain XAResources and register them with the transaction
+ via the JTA interfaces. It is these XAResources which the transaction service
+ will use when the transaction terminates in order to drive the database to either
commit or rollback the changes made via the JDBC connection.</p>
- <p> There are two ways in which the ArjunaTA JDBC 2.0 support can obtain XADataSources.
- These will be explained in the following sections. Note, for simplicity we shall
+ <p> There are two ways in which the ArjunaTA JDBC 2.0 support can obtain XADataSources.
+ These will be explained in the following sections. Note, for simplicity we shall
assume that the JDBC 2.0 driver is instantiated directly by the application.</p>
<ol>
<li>
<p>Java Naming and Directory Interface (JNDI)</p>
- <p> To get the ArjunaJDBC2Driver class to use a JNDI registered XADataSource
- it is first necessary to create the XADataSource instance and store it in
- an appropriate JNDI implementation. Details of how to do this can be found
+ <p> To get the ArjunaJDBC2Driver class to use a JNDI registered XADataSource
+ it is first necessary to create the XADataSource instance and store it in
+ an appropriate JNDI implementation. Details of how to do this can be found
in the JDBC 2.0 tutorial available at JavaSoft. An example is show below:</p>
<pre>XADataSource ds = MyXADataSource();
Hashtable env = new Hashtable();
@@ -110,9 +110,9 @@
env.put(Context.INITIAL_CONTEXT_FACTORY, initialCtx);
initialContext ctx = new InitialContext(env);
ctx.bind("jdbc/foo", ds);</pre>
- <p> Where the Context.INITIAL_CONTEXT_FACTORY property is the JNDI way of
+ <p> Where the Context.INITIAL_CONTEXT_FACTORY property is the JNDI way of
specifying the type of JNDI implementation to use.<br/>
- Then the application must pass an appropriate connection URL to the JDBC
+ Then the application must pass an appropriate connection URL to the JDBC
2.0 driver:</p>
<pre>Properties dbProps = new Properties();
dbProps.setProperty(TransactionalDriver.userName, "user");
@@ -120,23 +120,23 @@
TransactionalDriver arjunaJDBC2Driver = new TransactionalDriver();
Connection connection = arjunaJDBC2Driver.
connect("jdbc:arjuna:jdbc/foo", dbProps);</pre>
- <p> The JNDI URL must be pre-pended with <font face="Courier New, Courier, mono">jdbc:arjuna:</font>
- in order for the ArjunaJDBC2Driver to recognise that the DataSource must
+ <p> The JNDI URL must be pre-pended with <font face="Courier New, Courier, mono">jdbc:arjuna:</font>
+ in order for the ArjunaJDBC2Driver to recognise that the DataSource must
participate within transactions and be driven accordingly. </p>
</li>
<li>
<p>Dynamic class instantiation</p>
- <p> Many JDBC 2.0 implementations provide proprietary implementations of XADataSources
- that provide non-standard extensions to the specification. In order to allow
- the application to remain isolated from the actual JDBC 2.0 implementation
- it is using and yet continue to be able to use these extensions, ArjunaTA
- hides the details of these proprietary implementations using dynamic class
- instantiation. In addition, the use of JNDI is not required when using this
- mechanism because the actual implementation of the XADataSource will be
- directly instantiated, albeit in a manner which will not tie an application
- or driver to a specific implementation. ArjunaTA therefore has several classes
- which are for specific JDBC 2.0 implementations, and these can be selected
- at runtime by the application setting the dynamicClass property appropriately:
+ <p> Many JDBC implementations provide proprietary implementations of XADataSources
+ that provide non-standard extensions to the specification. In order to allow
+ the application to remain isolated from the actual JDBC 2.0 implementation
+ it is using and yet continue to be able to use these extensions, ArjunaTA
+ hides the details of these proprietary implementations using dynamic class
+ instantiation. In addition, the use of JNDI is not required when using this
+ mechanism because the actual implementation of the XADataSource will be
+ directly instantiated, albeit in a manner which will not tie an application
+ or driver to a specific implementation. ArjunaTA therefore has several classes
+ which are for specific JDBC implementations, and these can be selected
+ at runtime by the application setting the dynamicClass property appropriately:
</p>
</li>
</ol>
@@ -169,7 +169,7 @@
</table>
</blockquote>
<blockquote>
- <p>The application code must specify which dynamic class the TransactionalDriver
+ <p>The application code must specify which dynamic class the TransactionalDriver
should instantiate when setting up the connection:</p>
</blockquote>
<ul>
@@ -186,37 +186,37 @@
<p>Note on properties used by the com.arjuna.ats.jdbc.TransactionalDriver class</p>
<ul>
<li>
- <em>userName</em>: the user name to use when attempting to connect to the
+ <em>userName</em>: the user name to use when attempting to connect to the
database.</li>
<li>
- <em>password</em>: the password to use when attempting to connect to the
+ <em>password</em>: the password to use when attempting to connect to the
database.</li>
<li>
- <em>createDb</em>: if set to true, the driver will attempt to create the
+ <em>createDb</em>: if set to true, the driver will attempt to create the
database when it connects. This may not be supported by all JDBC 2.0 implementations.</li>
<li>
- <em>dynamicClass</em>: this specifies a class to instantiate to connect
+ <em>dynamicClass</em>: this specifies a class to instantiate to connect
to the database, rather than using JNDI.</li>
</ul>
<h4> Using the Connection</h4>
- <p>Once the connection has been established (for example, using the java.sql.DriverManager.getConnection
- method), all operations on the connection will be monitored by ArjunaTA. Once
- created, the driver and any connection can be used in the same way as any other
+ <p>Once the connection has been established (for example, using the java.sql.DriverManager.getConnection
+ method), all operations on the connection will be monitored by ArjunaTA. Once
+ created, the driver and any connection can be used in the same way as any other
JDBC driver or connection.</p>
- <p> ArjunaTA connections can be used within multiple different transactions simultaneously,
- i.e., different threads, with different notions of the current transaction,
- may use the same JDBC connection. ArjunaTA does connection pooling for each
- transaction within the JDBC connection. So, although multiple threads may use
- the same instance of the JDBC connection, internally this may be using a different
- connection instance per transaction. With the exception of close, all operations
- performed on the connection at the application level will only be performed
+ <p> ArjunaTA connections can be used within multiple different transactions simultaneously,
+ i.e., different threads, with different notions of the current transaction,
+ may use the same JDBC connection. ArjunaTA does connection pooling for each
+ transaction within the JDBC connection. So, although multiple threads may use
+ the same instance of the JDBC connection, internally this may be using a different
+ connection instance per transaction. With the exception of close, all operations
+ performed on the connection at the application level will only be performed
on this transaction-specific connection.</p>
- <p> ArjunaTA will automatically register the JDBC driver connection with the transaction
- via an appropriate resource . When the transaction terminates, this resource
- will be responsible for either committing or rolling back any changes made to
+ <p> ArjunaTA will automatically register the JDBC driver connection with the transaction
+ via an appropriate resource . When the transaction terminates, this resource
+ will be responsible for either committing or rolling back any changes made to
the underlying database via appropriate calls on the JDBC driver.</p>
<h4>Further reading</h4>
- <p>More details on the way to manage applications using the JDBC API can be found
+ <p>More details on the way to manage applications using the JDBC API can be found
in the ArjunaTA Programming Guide.</p>
</html>
</area>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_account.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_account.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_account.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Implementing the Account interface </header>
<content>
<navigation>
@@ -34,14 +34,14 @@
</navigation>
<area title="Implementing the Account interface">
<html>
- <p>To take benefit from the persistency and locking mechanism provided by ArjunaCore,
- a user class can inherit from the appropriate class (StateManager for recovery,
- and LockManager for recovery and concurrency control). The AccountImpl class
- that implements the Account interface inherits the LockManager and implements
- the AccountOperations interface generated by the CORBA IDL compiler. Since multiple
- inheritance is not allowed in Java, inheriting the AccountPOA class, as made
- in simple jts remote version, in addition to the LockManager is not possible.
- That we use in this version a CORBA TIE mechanism to associate a servant to
+ <p>To take benefit from the persistency and locking mechanism provided by ArjunaCore,
+ a user class can inherit from the appropriate class (StateManager for recovery,
+ and LockManager for recovery and concurrency control). The AccountImpl class
+ that implements the Account interface inherits the LockManager and implements
+ the AccountOperations interface generated by the CORBA IDL compiler. Since multiple
+ inheritance is not allowed in Java, inheriting the AccountPOA class, as made
+ in simple jts remote version, in addition to the LockManager is not possible.
+ That we use in this version a CORBA TIE mechanism to associate a servant to
an CORBA object reference.</p>
<p>The Java interface definition of the AccountImpl class is given below:</p>
<pre>public class AccountImpl <strong>
@@ -60,15 +60,15 @@
public String type();
}</pre>
<ul>
- <li>Constructors and Destructor
- <p>To use an existing persistent object requires the use of a special constructor
- that is required to take the Uid of the persistent object; the implementation
+ <li>Constructors and Destructor
+ <p>To use an existing persistent object requires the use of a special constructor
+ that is required to take the Uid of the persistent object; the implementation
of such a constructor is given below:</p>
<pre>public AccountImpl(Uid uid)
{
- super(uid);
- // Invoking super will lead to invoke the
+ super(uid);
+ // Invoking super will lead to invoke the
//restore_state method of this AccountImpl class
}</pre>
<p>There is no particular behaviour applied by the Constructor with the Uid parameter The following constructor is used for a new Account creation.</p>
@@ -90,15 +90,15 @@
}
</pre>
- <li>save_state, restore_state and type
- <p>The implementations of save_state and restore_state are relatively simple
+ <li>save_state, restore_state and type
+ <p>The implementations of save_state and restore_state are relatively simple
for this example:</p>
<pre>public boolean save_state (OutputObjectState os, int ObjectType)
{
if (!super.save_state(os, ObjectType))
return false;
-
+
try
{
os.packString(_name);
@@ -114,7 +114,7 @@
{
if (!super.restore_state(os, ObjectType))
return false;
-
+
try
{
_name = os.unpackString();
@@ -133,9 +133,9 @@
{
return "/StateManager/LockManager/BankingAccounts";
}</pre>
-
- <li>account management operations
-
+
+ <li>account management operations
+
<pre>public float balance()
{
float result = 0;
@@ -148,9 +148,9 @@
return result;
}</pre>
- <p> Since the balance operation consists only to get the current balance,
- acquiring a lock in READ mode is enough. This is not the case of the credit
- and debit methods that need to modify the current balance, that is a WRITE
+ <p> Since the balance operation consists only to get the current balance,
+ acquiring a lock in READ mode is enough. This is not the case of the credit
+ and debit methods that need to modify the current balance, that is a WRITE
mode is needed.</p>
<pre>
public void credit( float value )
@@ -173,7 +173,7 @@
</li>
</ul>
<h5>Sample Application Source Code</h5>
- <p>Full source code for the <a class="linkscoloured" href="../src/com/arjuna/demo/jts/txojbank/AccountImpl.java">AccountImpl</a>
+ <p>Full source code for the <a class="linkscoloured" href="../src/com/arjuna/demo/jts/txojbank/AccountImpl.java">AccountImpl</a>
class is included to provide you with a starting point for experimentation.</p>
</html>
</area>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_bankImpl.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_bankImpl.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_bankImpl.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Implementing the Account interface </header>
<content>
<navigation>
@@ -34,13 +34,13 @@
</navigation>
<area title="Implementing the Bank interface">
<html>
- <p>To take benefit from the persistency and locking mechanism provided by ArjunaCore,
- a user class can inherit from the appropriate class (StateManager for recovery,
- and LockManager for recovery and concurrency control). The BankImpl class that
- implements the Bank interface inherits the LockManager and implements the BankOperations
- interface generated by the CORBA IDL compiler. Since multiple inheritance is
- not allowed in Java, inheriting the BankPOA class, as made in simple jts remote
- version, in addition to the LockManager is not possible. That we use in this
+ <p>To take benefit from the persistency and locking mechanism provided by ArjunaCore,
+ a user class can inherit from the appropriate class (StateManager for recovery,
+ and LockManager for recovery and concurrency control). The BankImpl class that
+ implements the Bank interface inherits the LockManager and implements the BankOperations
+ interface generated by the CORBA IDL compiler. Since multiple inheritance is
+ not allowed in Java, inheriting the BankPOA class, as made in simple jts remote
+ version, in addition to the LockManager is not possible. That we use in this
version a CORBA TIE mechanism to associate a servant to an CORBA object reference.</p>
<p>The Java interface definition of the BankImpl class is given below:</p>
<pre>public class BankImpl extends LockManager implements BankOperations
@@ -54,19 +54,19 @@
public boolean restore_state (InputObjectState os, int ObjectType);
public String type();
- public static final int ACCOUNT_SIZE = 10;
- // ACCOUNT_SIZE is the maximum number of accounts
+ public static final int ACCOUNT_SIZE = 10;
+ // ACCOUNT_SIZE is the maximum number of accounts
private String [] accounts;
private int numberOfAccounts;
private ORB _orb;
private OA _oa;
- private java.util.Hashtable _accounts; //The list of accounts
+ private java.util.Hashtable _accounts; //The list of accounts
}</pre>
<ul>
- <li>Constructors and Destructor
- <p>To use an existing persistent object requires the use of a special constructor
- that is required to take the Uid of the persistent object; the implementation
+ <li>Constructors and Destructor
+ <p>To use an existing persistent object requires the use of a special constructor
+ that is required to take the Uid of the persistent object; the implementation
of such a constructor is given below:</p>
<pre>public BankImpl(Uid uid)
@@ -84,10 +84,10 @@
_oa = oa;<br/> numberOfAccounts = 0;
accounts = new String[ACCOUNT_SIZE];
}</pre>
-<p>The following constructor is invoked on successive BankServer restart.
- A bank already exists and should be recreated. Invoking super or the constructor
- of the inherited class leads to execute the restore_state method, described
- below, of the BankImpl class to rebuild the list of accounts previously
+<p>The following constructor is invoked on successive BankServer restart.
+ A bank already exists and should be recreated. Invoking super or the constructor
+ of the inherited class leads to execute the restore_state method, described
+ below, of the BankImpl class to rebuild the list of accounts previously
created, if any.</p>
<pre>
public BankImpl(Uid uid, OA oa)
@@ -110,7 +110,7 @@
</pre>
</blocquote>
<ul>
- <li>account management operations
+ <li>account management operations
<pre>public Account create_account( String name )
{
@@ -120,17 +120,17 @@
if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
{
//Check if the maximum number of accounts is not reached
- if (numberOfAccounts < ACCOUNT_SIZE)
+ if (numberOfAccounts < ACCOUNT_SIZE)
{
acc = new AccountImpl(name); //Create a new account
//Use the TIE mechanism to create a CORBA object
- account = new AccountPOATie(acc);
- //Add the account to the list of accounts that
+ account = new AccountPOATie(acc);
+ //Add the account to the list of accounts that
//facilitate to retrieve accounts
- _accounts.put( name, acc);
+ _accounts.put( name, acc);
//The Uid of the created account is put in the array
accounts[numberOfAccounts] = acc.get_uid().toString();
- numberOfAccounts++;
+ numberOfAccounts++;
}
}
return com.arjuna.demo.jts.txojbank.
@@ -144,22 +144,22 @@
AccountImpl acc = ( AccountImpl ) _accounts.get( name );
AccountPOA account = new AccountPOATie(acc);
if ( acc == null )
- throw new NotExistingAccount("The Account
+ throw new NotExistingAccount("The Account
requested does not exist");
return com.arjuna.demo.jts.txojbank.
- AccountHelper.narrow(_oa.corbaReference(account));
+ AccountHelper.narrow(_oa.corbaReference(account));
}</pre>
</li>
</ul>
<ul>
- <li>save_state, restore_state and type
+ <li>save_state, restore_state and type
<pre>public boolean save_state (OutputObjectState os, int ObjectType)
{
if (!super.save_state(os, ObjectType))
return false;
-
+
try
{
os.packInt(numberOfAccounts);
@@ -167,7 +167,7 @@
{
// All Uid located in the array will be saved
for (int i = 0; i < numberOfAccounts; i++)
- os.packString(accounts[i]);
+ os.packString(accounts[i]);
}
return true;
}
@@ -185,17 +185,17 @@
try
{
numberOfAccounts = os.unpackInt();
-
+
if (numberOfAccounts > 0)
{
- for (int i = 0; i < numberOfAccounts; i++)
+ for (int i = 0; i < numberOfAccounts; i++)
{
accounts[i] = os.unpackString();
- //each stored Uid is re-used to recreate
+ //each stored Uid is re-used to recreate
//a stored account object
AccountImpl acc = new AccountImpl(new Uid(accounts[i]));
- acc.activate();
- //Once recreated the account object
+ acc.activate();
+ //Once recreated the account object
//is activated and added to the list.
_accounts.put( acc.getName(), acc);
}
@@ -215,7 +215,7 @@
</li>
</ul>
<h5>Sample Application Source Code</h5>
- <p>Full source code for the <a class="linkscoloured" href="../src/com/arjuna/demo/jts/txojbank/BankImpl.java">BankImpl</a>
+ <p>Full source code for the <a class="linkscoloured" href="../src/com/arjuna/demo/jts/txojbank/BankImpl.java">BankImpl</a>
class is included to provide you with a starting point for experimentation.<br/>
</p>
</html>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_bankServer.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_bankServer.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_bankServer.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Implementing the Account interface </header>
<content>
<navigation>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_deploy.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_deploy.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_deploy.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> What is Transactional Object For Java </header>
<content>
<navigation>
@@ -35,20 +35,20 @@
</navigation>
<area title="Making the Banking Application Persistent with Transactional Object For Java">
<html>
- <p>The banking application consists of a Bank object that contains a list of Account
- object, which in turn have a String (name) and a float (the value) as member
- variables. It appears clearly that from the persistent point of view, an Account
- Object need to store its name and its current balance or value, while the Bank
+ <p>The banking application consists of a Bank object that contains a list of Account
+ object, which in turn have a String (name) and a float (the value) as member
+ variables. It appears clearly that from the persistent point of view, an Account
+ Object need to store its name and its current balance or value, while the Bank
Object need to store the list of accounts that it manages.</p>
<h4>Distributed Configuration </h4>
- <p>The banking application with Transactional Object for Java (TXOJ) is configured
- to use JTS interfaces as the API to create the transaction, then an ORB to deploy
- it. The JBossTS distribution is provided to works with JacOrb version 2.1
+ <p>The banking application with Transactional Object for Java (TXOJ) is configured
+ to use JTS interfaces as the API to create the transaction, then an ORB to deploy
+ it. The JBossTS distribution is provided to works with JacOrb version 2.1
that can be obtained from the same download location as JBossTS.</p>
<p>
<strong>Note</strong>: Ensure that the jacorb jar files are added in your CLASSPATH</p>
<h4>Delpoy the Application</h4>
-
+
<p>- Start the Server</p>
<blockquote>
<pre>
@@ -61,11 +61,11 @@
<font face="Courier New, Courier, mono">java com.arjuna.demo.jts.txojbank.BankClient</font>
</pre>
</blockquote>
- <p>As for the demonstrations presented in the previous trails, the same menu is
- presented for the client with a set of operations such creating an account,
+ <p>As for the demonstrations presented in the previous trails, the same menu is
+ presented for the client with a set of operations such creating an account,
credit/withdraw money to/from an account and making a transfer.</p>
<p>
- <a class="linkscoloured" href="part6_txoj_banking_develop.html">Building the banking application
+ <a class="linkscoloured" href="part6_txoj_banking_develop.html">Building the banking application
with TXOJ tools</a>
</p>
</html>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_develop.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_develop.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_banking_develop.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> What is Transactional Object For Java </header>
<content>
<navigation>
@@ -35,11 +35,11 @@
<area title="Building the banking application with TXOJ">
<html>
<h5>The Bank IDL</h5>
- <p>Since a distributed version has been adopted to present the application with
- Transactional Object for Java, an IDL file named Bank.idl described below is
- needed. The difference with the Bank.idl presented in previous trails is the
- fact that the Bank interface inherits the CosTransactions::TransactionalObject
- interface. Since we consider now that a Bank object need to modify its list
+ <p>Since a distributed version has been adopted to present the application with
+ Transactional Object for Java, an IDL file named Bank.idl described below is
+ needed. The difference with the Bank.idl presented in previous trails is the
+ fact that the Bank interface inherits the CosTransactions::TransactionalObject
+ interface. Since we consider now that a Bank object need to modify its list
in a transactional, we consider now a Bank object as a CORBA transactional.</p>
<pre>module arjuna {
@@ -53,10 +53,10 @@
void credit( in float value );
void debit( in float value );
};
-
+
exception NotExistingAccount
{ };
-
+
interface Bank <strong>: CosTransactions::TransactionalObject</strong>
{
Account create_account( in string name );
@@ -70,8 +70,8 @@
<ul>
<li>The client program<br/>
- Basically the client program (<a class="linkscoloured" href="../src/com/arjuna/demo/jts/txojbank/BankClient.java">BankClient.java</a>)
- is equivalent to the one described in the distributed jts version with implicit
+ Basically the client program (<a class="linkscoloured" href="../src/com/arjuna/demo/jts/txojbank/BankClient.java">BankClient.java</a>)
+ is equivalent to the one described in the distributed jts version with implicit
propagation, the difference is on the package name.</li>
<li>
<a class="linkscoloured" href="part6_txoj_banking_account.html">Implementing the Account Interface</a>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_introduction.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_introduction.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part6_txoj_introduction.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> What is Transactional Object For Java </header>
<content>
<navigation>
@@ -33,32 +33,32 @@
</navigation>
<area title="What is Transactional Object For Java">
<html>
- <p>ArjunaCore exploits object-oriented techniques to present programmers with
- a toolkit of Java classes from which application classes can inherit to obtain
- desired properties, such as persistence and concurrency control. These classes
+ <p>ArjunaCore exploits object-oriented techniques to present programmers with
+ a toolkit of Java classes from which application classes can inherit to obtain
+ desired properties, such as persistence and concurrency control. These classes
form a hierarchy, part of which is shown below.</p>
<p>
<img src="includes/ArjunaCore_Classes.GIF"/>
</p>
<p>Figure 1 - ArjunaCore class hierarchy.</p>
- <p>Apart from specifying the scopes of transactions, and setting appropriate locks
- within objects, the application programmer does not have any other responsibilities:
- ArjunaCore and Transactional Objects for Java (TXOJ) guarantee that transactional
- objects will be registered with, and be driven by, the appropriate transactions,
+ <p>Apart from specifying the scopes of transactions, and setting appropriate locks
+ within objects, the application programmer does not have any other responsibilities:
+ ArjunaCore and Transactional Objects for Java (TXOJ) guarantee that transactional
+ objects will be registered with, and be driven by, the appropriate transactions,
and crash recovery mechanisms are invoked automatically in the event of failures.</p>
<h4>Recovery and Persistency</h4>
- <p>Making an object persistent and recoverable means that we shall be able to
- store its final state or to retrieve its initial state according to the final
- status of a transaction even in the presence of failures. ArjunaCore provides
- a set of techniques to save to and to retrieve from the Object Store states
- of objects. All objects made persistent with these ArjunaCore mechanisms are
- assigned unique identifiers (instances of the Uid class), when they are created,
- and this is to identify them within the object store. Due to common functionality
- for persistency and recovery required by several applications, objects are stored
- and retrieved from the object store using the same mechanism: the classes OutputObjectState
+ <p>Making an object persistent and recoverable means that we shall be able to
+ store its final state or to retrieve its initial state according to the final
+ status of a transaction even in the presence of failures. ArjunaCore provides
+ a set of techniques to save to and to retrieve from the Object Store states
+ of objects. All objects made persistent with these ArjunaCore mechanisms are
+ assigned unique identifiers (instances of the Uid class), when they are created,
+ and this is to identify them within the object store. Due to common functionality
+ for persistency and recovery required by several applications, objects are stored
+ and retrieved from the object store using the same mechanism: the classes OutputObjectState
and InputObjecState.</p>
- <p>At the root of the class hierarchy, given in Figure 1, is the class StateManager.
- This class is responsible for object activation and deactivation and object
+ <p>At the root of the class hierarchy, given in Figure 1, is the class StateManager.
+ This class is responsible for object activation and deactivation and object
recovery. The simplified signature of the class is:</p>
<blockquote>
<pre>public abstract class StateManager
@@ -75,48 +75,48 @@
protected StateManager (Uid id);
};</pre>
</blockquote>
- <p> Objects are assumed to be of three possible flavours. They may simply be recoverable,
- in which case StateManager will attempt to generate and maintain appropriate
- recovery information for the object. Such objects have lifetimes that do not
- exceed the application program that creates them. Objects may be recoverable
- and persistent, in which case the lifetime of the object is assumed to be greater
- than that of the creating or accessing application, so that in addition to maintaining
- recovery information StateManager will attempt to automatically load (unload)
- any existing persistent state for the object by calling the activate (deactivate)
- operation at appropriate times. Finally, objects may possess none of these capabilities,
- in which case no recovery information is ever kept nor is object activation/deactivation
+ <p> Objects are assumed to be of three possible flavours. They may simply be recoverable,
+ in which case StateManager will attempt to generate and maintain appropriate
+ recovery information for the object. Such objects have lifetimes that do not
+ exceed the application program that creates them. Objects may be recoverable
+ and persistent, in which case the lifetime of the object is assumed to be greater
+ than that of the creating or accessing application, so that in addition to maintaining
+ recovery information StateManager will attempt to automatically load (unload)
+ any existing persistent state for the object by calling the activate (deactivate)
+ operation at appropriate times. Finally, objects may possess none of these capabilities,
+ in which case no recovery information is ever kept nor is object activation/deactivation
ever automatically attempted.</p>
- <p>According to the its activation or deactivation a transactional object for
- Java move from a passive state to an active state and vice-versa. The fundamental
+ <p>According to the its activation or deactivation a transactional object for
+ Java move from a passive state to an active state and vice-versa. The fundamental
life cycle of a persistent object in TXOJ is shown in Figure 2. </p>
<p>
<img src="includes/txoj_lifecycle.GIF"/>
</p>
<p>Figure 2 - The life cycle of a persistent object.</p>
<ul>
- <li> The object is initially passive, and is stored in the object store as an
+ <li> The object is initially passive, and is stored in the object store as an
instance of the class OutputObjectState.</li>
- <li> When required by an application the object is automatically activated by
- reading it from the store using a read_committed operation and is then converted
- from an InputObjectState instance into a fully-fledged object by the restore_state
+ <li> When required by an application the object is automatically activated by
+ reading it from the store using a read_committed operation and is then converted
+ from an InputObjectState instance into a fully-fledged object by the restore_state
operation of the object.</li>
- <li> When the application has finished with the object it is deactivated by
- converting it back into an OutputObjectState instance using the save_state
- operation, and is then stored back into the object store as a shadow copy
- using write_uncommitted. This shadow copy can be committed, overwriting the
- previous version, using the commit_state operation. The existence of shadow
- copies is normally hidden from the programmer by the transaction system. Object
- de-activation normally only occurs when the top-level transaction within which
+ <li> When the application has finished with the object it is deactivated by
+ converting it back into an OutputObjectState instance using the save_state
+ operation, and is then stored back into the object store as a shadow copy
+ using write_uncommitted. This shadow copy can be committed, overwriting the
+ previous version, using the commit_state operation. The existence of shadow
+ copies is normally hidden from the programmer by the transaction system. Object
+ de-activation normally only occurs when the top-level transaction within which
the object was activated commits.</li>
</ul>
- <p>While deactivating and activating a transactional object for java, the operations
- save_state and restore_state are respectively invoked. These operations must
- be implemented by the programmer since StateManager cannot detect user level
- state changes. This gives the programmer the ability to decide which parts of
- an object’s state should be made persistent. For example, for a spreadsheet
- it may not be necessary to save all entries if some values can simply be recomputed.
- The save_state implementation for a class Example that has two integer member
- variables called A and B and one String member variable called C could simply
+ <p>While deactivating and activating a transactional object for java, the operations
+ save_state and restore_state are respectively invoked. These operations must
+ be implemented by the programmer since StateManager cannot detect user level
+ state changes. This gives the programmer the ability to decide which parts of
+ an object’s state should be made persistent. For example, for a spreadsheet
+ it may not be necessary to save all entries if some values can simply be recomputed.
+ The save_state implementation for a class Example that has two integer member
+ variables called A and B and one String member variable called C could simply
be:</p>
<pre>public boolean save_state(OutputObjectState o)
@@ -136,7 +136,7 @@
return true;
}</pre>
- <p>while, the corresponding restore_state implementation allowing to retrieve
+ <p>while, the corresponding restore_state implementation allowing to retrieve
similar values is:</p>
<pre>public boolean restore_state(InputObjectState o)
@@ -157,30 +157,30 @@
}
</pre>
- <p>Classes OutputObjectState and InputObjectState provide respectively operations
- to pack and unpack instances of standard Java data types. In other words for
- a standard Java data type, for instance Long or Short, there are corresponding
- methods to pack and unpack, i.e., packLong or packShort and unpackLong or unpackShort.
+ <p>Classes OutputObjectState and InputObjectState provide respectively operations
+ to pack and unpack instances of standard Java data types. In other words for
+ a standard Java data type, for instance Long or Short, there are corresponding
+ methods to pack and unpack, i.e., packLong or packShort and unpackLong or unpackShort.
</p>
<p>
- <strong>Note:</strong> it is necessary for all save_state and restore_state
- methods to call super.save_state and super.restore_state. This is to cater for
+ <strong>Note:</strong> it is necessary for all save_state and restore_state
+ methods to call super.save_state and super.restore_state. This is to cater for
improvements in the crash recovery mechanisms.</p>
<h4>The concurrency controller</h4>
- <p> The concurrency controller is implemented by the class LockManager which provides
- sensible default behaviour while allowing the programmer to override it if deemed
- necessary by the particular semantics of the class being programmed. The primary
- programmer interface to the concurrency controller is via the setlock operation.
- By default, the runtime system enforces strict two-phase locking following a
- multiple reader, single writer policy on a per object basis. However, as shown
- in Figure 1, by inheriting from the Lock class it is possible for programmers
- to provide their own lock implementations with different lock conflict rules
+ <p> The concurrency controller is implemented by the class LockManager which provides
+ sensible default behaviour while allowing the programmer to override it if deemed
+ necessary by the particular semantics of the class being programmed. The primary
+ programmer interface to the concurrency controller is via the setlock operation.
+ By default, the runtime system enforces strict two-phase locking following a
+ multiple reader, single writer policy on a per object basis. However, as shown
+ in Figure 1, by inheriting from the Lock class it is possible for programmers
+ to provide their own lock implementations with different lock conflict rules
to enable type specific concurrency control.</p>
- <p> Lock acquisition is (of necessity) under programmer control, since just as
- StateManager cannot determine if an operation modifies an object, LockManager
- cannot determine if an operation requires a read or write lock. Lock release,
- however, is under control of the system and requires no further intervention
- by the programmer. This ensures that the two-phase property can be correctly
+ <p> Lock acquisition is (of necessity) under programmer control, since just as
+ StateManager cannot determine if an operation modifies an object, LockManager
+ cannot determine if an operation requires a read or write lock. Lock release,
+ however, is under control of the system and requires no further intervention
+ by the programmer. This ensures that the two-phase property can be correctly
maintained.</p>
<pre>public abstract class LockManager extends StateManager
@@ -188,12 +188,12 @@
public LockResult setlock (Lock toSet, int retry, int timeout);
};</pre>
- <p> The LockManager class is primarily responsible for managing requests to set
- a lock on an object or to release a lock as appropriate. However, since it is
- derived from StateManager, it can also control when some of the inherited facilities
- are invoked. For example, LockManager assumes that the setting of a write lock
- implies that the invoking operation must be about to modify the object. This
- may in turn cause recovery information to be saved if the object is recoverable.
+ <p> The LockManager class is primarily responsible for managing requests to set
+ a lock on an object or to release a lock as appropriate. However, since it is
+ derived from StateManager, it can also control when some of the inherited facilities
+ are invoked. For example, LockManager assumes that the setting of a write lock
+ implies that the invoking operation must be about to modify the object. This
+ may in turn cause recovery information to be saved if the object is recoverable.
In a similar fashion, successful lock acquisition causes activate to be invoked.</p>
<p> The code below shows how we may try to obtain a write lock on an object:</p>
<pre>public class Example extends LockManager
@@ -203,10 +203,10 @@
AtomicAction A = new AtomicAction;
/*
<strong>
- * The ArjunaCore AtomicAction class is here used to create
- * a transaction. Any interface provided by the JTA or
- * JTS interfaces that allow to create transactions can
- * be used in association with the Locking mechanisms
+ * The ArjunaCore AtomicAction class is here used to create
+ * a transaction. Any interface provided by the JTA or
+ * JTS interfaces that allow to create transactions can
+ * be used in association with the Locking mechanisms
* described in this trail.</strong>
*/
boolean result = false;
@@ -232,7 +232,7 @@
}
</pre>
<h4>Further Reading</h4>
- <p>More details on Transactional Object For Java can be found in the ArjunaCore
+ <p>More details on Transactional Object For Java can be found in the ArjunaCore
Programming Guide.<br/>
</p>
</html>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part7.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part7.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/part7.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="JBoss (a Division of Redhat): Trail map: Running and Testing Examples" rootpath="../..">
+<page title="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
<header> Recovery From Failure </header>
<content>
<navigation>
@@ -35,25 +35,25 @@
</navigation>
<area title="Recovery From Failure Examples">
<html>
- <p>Recovery is the mechanism which preserves the transaction atomicity in presence of failures.
- The basic technique for implementing transactions in presence of failures is based on the use
- of logs. That is, a transaction system has to record enough information to ensure that it can
- be able to return to a previous state in case of failure or to ensure that changes committed by a
+ <p>Recovery is the mechanism which preserves the transaction atomicity in presence of failures.
+ The basic technique for implementing transactions in presence of failures is based on the use
+ of logs. That is, a transaction system has to record enough information to ensure that it can
+ be able to return to a previous state in case of failure or to ensure that changes committed by a
transaction are properly stored.</p>
<p>
- ATS ensures that results of a transaction are applied consistently to all resources involved in
- a transaction, even in the presence of failure. To recover from failure, ATS relies on its Recovery
+ JBossTS ensures that results of a transaction are applied consistently to all resources involved in
+ a transaction, even in the presence of failure. To recover from failure, JBossTS relies on its Recovery
Manager.</p>
<p>
- Basically, the Recovery Manager is a daemon process that invokes a set of well known Recovery Modules
- periodically in two steps; a first to determine transactions in doubt state and a second step to continue
- the completion of those transactions found in the first step. Since different type of resources may be
- involved in a transaction, different type of Recovery Modules may exist. ATS provides several type of
- modules that manage resources according to their position in the transaction tree (root, subordinate, leaf)
- or the nature of the data itself, transactional object for java or XAResource as seen in
+ Basically, the Recovery Manager is a daemon process that invokes a set of well known Recovery Modules
+ periodically in two steps; a first to determine transactions in doubt state and a second step to continue
+ the completion of those transactions found in the first step. Since different type of resources may be
+ involved in a transaction, different type of Recovery Modules may exist. JBossTS provides several type of
+ modules that manage resources according to their position in the transaction tree (root, subordinate, leaf)
+ or the nature of the data itself, transactional object for java or XAResource as seen in
<a class="linkscoloured" href="part6.html">the previous trail</a>. </p>
<p>
- Whatever the nature of the involved resource, recovery is based on information or logs held in the Object Store,
+ Whatever the nature of the involved resource, recovery is based on information or logs held in the Object Store,
which contains specific subdirectory holding information according to the nature of the participant.
</p>
</html>
@@ -61,8 +61,8 @@
<area title="Running the Recovery Manager">
<html>
<p>
- <i>This section provides only brief information on running the recovery manager from provided scripts.
- For complete information on the recovery manager (including how to configure it), click
+ <i>This section provides only brief information on running the recovery manager from provided scripts.
+ For complete information on the recovery manager (including how to configure it), click
<a class="linkscoloured" href="JBossTS_Recovery.html">here</a>.</i></p>
<h4>Windows</h4>
<p>
@@ -105,14 +105,14 @@
The application consists of four classes. Each class is well documented and it is recommended that the provided code is inspected to gain
useful insight into some of the nuances of the recovery process.
<ul>
- <li>The code of the main class that controls the application
+ <li>The code of the main class that controls the application
(<a class="linkscoloured" href="../src/com/arjuna/demo/recovery/xaresource/TestXAResourceRecovery.java">TestRecoveryModule.java</a>), allows
the user to specify a number of options: <font face="Courier New, Courier, mono">[-waitForRecovery] [-useExternalRecoveryManager]</font></li>
<li>Programmer-defined support of the Serializable XAResource is only required in the XAResource implementation class
<a class="linkscoloured" href="../src/com/arjuna/demo/recovery/xaresource/ExampleXAResource.java">ExampleXAResource.java</a></li>
<li>Programmer-defined support of the non-Serializable XAResource is required both in the XAResource implementation class
<a class="linkscoloured" href="../src/com/arjuna/demo/recovery/xaresource/NonSerializableExampleXAResource.java">NonSerializableExampleXAResource</a>,
- and in a class that implements a helper for the Arjuna recovery process
+ and in a class that implements a helper for the Arjuna recovery process
<a class="linkscoloured" href="../src/com/arjuna/demo/recovery/xaresource/NonSerializableExampleXAResourceRecovery.java">NonSerializableExampleXAResourceRecovery.java</a></li>
</ul>
<h4>XAResourceRecovery registration</h4>
@@ -120,12 +120,12 @@
<p>
When recovering from failures, Arjuna requires the ability to reconnect to the XAResource
that were in use prior to the failures in order to resolve any outstanding transactions.
- In order to recreate those connections for non-Serializable XAResources it is necessary to
+ In order to recreate those connections for non-Serializable XAResources it is necessary to
provide implementations of the following Arjuna interface com.arjuna.ats.jta.waitForRecovery.XAResourceRecovery.</p>
<p>
To inform the waitForRecovery system about each of the XAResourceRecovery instances, it is
- necessary to specify their class names through property variables in the arjunajts-properties.xml file.
- Any property variable which starts with the name XAResourceRecovery will be assumed to represent
+ necessary to specify their class names through property variables in the arjunajts-properties.xml file.
+ Any property variable which starts with the name XAResourceRecovery will be assumed to represent
one of these instances, and its value should be the class name.</p>
<p>
@@ -140,7 +140,7 @@
used with caution.</p>
<p>
- The recovery module for the non-Serializable XAResource must be deployed in order to provide support to recover the non-Serializable XAResource.
+ The recovery module for the non-Serializable XAResource must be deployed in order to provide support to recover the non-Serializable XAResource.
If this step was missed out the Serializable XAResource would recover OK but Arjuna would have no knowledge of the non-Serializable XAResource
and so it could not recover it. To register the non-Serializable XAResource XAResourceRecovery module, add an entry to the arjunajts-properties.xml.</p>
@@ -157,18 +157,18 @@
before re-checking the resources. Although the test will run OK with this configuration, it is possible to configure the recovery
manager scan times to reduce the time waiting. To configure the intervals, edit the arjunajts-properties.xml as follows:</p>
<ul>
- <li>Edit the property <font face="Courier New, Courier, mono">"com.arjuna.ats.arjuna.recovery.periodicRecoveryPeriod"</font>
+ <li>Edit the property <font face="Courier New, Courier, mono">"com.arjuna.ats.arjuna.recovery.periodicRecoveryPeriod"</font>
to change the value from 120 to 5.</li>
- <li>Edit the property <font face="Courier New, Courier, mono">"com.arjuna.ats.arjuna.recovery.recoveryBackoffPeriod"</font>
+ <li>Edit the property <font face="Courier New, Courier, mono">"com.arjuna.ats.arjuna.recovery.recoveryBackoffPeriod"</font>
to change the value from 10 to 5.</li>
</ul>
<h4>Specify the transaction manager type to use</h4>
<p>
- The recovery manager will work in the same manner for either the JTA or JTS implementation. By default the JBoss Transaction Service
- is configured to use a JTS transaction manager, in order to configure it to use a JTA transaction manager a change must again be made
- to the arjunajts-properties.xml. <i>See <a class="linkscoloured" href="part5_testing_jta.html">here</a> for more information on how to configure
- the ATS transaction manager to use JTA rather than JTS.</i></p>
+ The recovery manager will work in the same manner for either the JTA or JTS implementation. By default the JBoss Transaction Service
+ is configured to use a JTS transaction manager, in order to configure it to use a JTA transaction manager a change must again be made
+ to the arjunajts-properties.xml. <i>See <a class="linkscoloured" href="part5_testing_jta.html">here</a> for more information on how to configure
+ the JBossTS transaction manager to use JTA rather than JTS.</i></p>
<p>
<b>If you do change the transaction manager type remember to reconfigure the recovery manager as follows:</b></p>
<p>
@@ -201,15 +201,15 @@
<area title="The Recovery Process and AbstractRecords">
<html>
<p>
- <b>WARNING: Implementing a RecoveryModule and AbstractRecord is a very advanced feature of the transaction service. It should only
- be performed by users familiar with the all the concepts used in the JBoss Transactions product. Please see the ArjunaCore guide for more
+ <b>WARNING: Implementing a RecoveryModule and AbstractRecord is a very advanced feature of the transaction service. It should only
+ be performed by users familiar with the all the concepts used in the JBoss Transactions product. Please see the ArjunaCore guide for more
information about RecoveryModules and AbstractRecords.</b></p>
<p>
The following sample gives an overview how the Recovery Manager invokes a module to recover from failure.
- This basic sample does not aim to present a complete process to recover from failure, but mainly to illustrate
+ This basic sample does not aim to present a complete process to recover from failure, but mainly to illustrate
the way to implement a recovery module. More details can be found in "Failure Recovery Guide". </p>
- The application used here consists to create an atomic transaction, to register a participant within
- the created transaction and finally to terminate it either by commit or abort. A set of arguments
+ The application used here consists to create an atomic transaction, to register a participant within
+ the created transaction and finally to terminate it either by commit or abort. A set of arguments
are provided:
<ul>
<li>to decide committing or aborting the transaction,</li>
@@ -218,30 +218,30 @@
<h4>The demo's components</h4>
The application consists of three programs
<ul>
- <li>The code of the main class that control the application
- (<a class="linkscoloured" href="../src/com/arjuna/demo/recoverymodule/TestRecoveryModule.java">TestRecoveryModule.java</a>),
+ <li>The code of the main class that control the application
+ (<a class="linkscoloured" href="../src/com/arjuna/demo/recoverymodule/TestRecoveryModule.java">TestRecoveryModule.java</a>),
which consists to give the choice to either commit or abort the transaction and also to generate a crash.
</li>
<li>The registered participant (<a class="linkscoloured" href="../src/com/arjuna/demo/recoverymodule/SimpleRecord.java">SimpleRecord.java</a>) has the following behaviour: <br/>
- - During the prepare phase, it writes a simple message - "I'm prepared" - on the disk such
+ - During the prepare phase, it writes a simple message - "I'm prepared" - on the disk such
The message is written in a well known file <br/>
- - During the commit phase, it writes another message - "I'm committed" - in the same file
+ - During the commit phase, it writes another message - "I'm committed" - in the same file
used during prepare <br/>
- If it receives an abort message, it removes from the disk the file used for prepare if any. <br/>
- if a crash has been decided for the test, then it crashes during the commit phase - the file remains
with the message "I'm prepared".
</li>
- <li>A Recovery Module (<a class="linkscoloured" href="../src/com/arjuna/demo/recoverymodule/SimpleRecoveryModule.java">SimpleRecoveryModule.java</a>) that consists to read the content of the file used to store the status of the participant,
- to determine that status and print a message indicating if a recovery action is needed or not.
+ <li>A Recovery Module (<a class="linkscoloured" href="../src/com/arjuna/demo/recoverymodule/SimpleRecoveryModule.java">SimpleRecoveryModule.java</a>) that consists to read the content of the file used to store the status of the participant,
+ to determine that status and print a message indicating if a recovery action is needed or not.
</li>
</ul>
- Using the provided ATS Recovery Modules ensures that resources are correctly recovered. This sample illustrates
- how to define and register its own module. It's the responsibility of the module to re-create the appropriate
+ Using the provided JBossTS Recovery Modules ensures that resources are correctly recovered. This sample illustrates
+ how to define and register its own module. It's the responsibility of the module to re-create the appropriate
objects using information retrieved from a log.
-
+
<h4>Recovery Module registration</h4>
- The recovery module should now be deployed in order to be called by the Recovery Manager. To do so,
- we just need to add an entry in the arjunajts-properties.xml by adding a new property as follow:
+ The recovery module should now be deployed in order to be called by the Recovery Manager. To do so,
+ we just need to add an entry in the arjunajts-properties.xml by adding a new property as follow:
<blockquote>
<property name="com.arjuna.ats.arjuna.recovery.recoveryExtension<i>"
value="com.arjuna.demo.recoverymodule.SimpleRecoveryModule"/>
@@ -249,14 +249,14 @@
Where <i> represent the new occurrence number that follows the last that already exists in the file. Once started, the Recovery Manager will automatically load the added Recovery module.
<h4>Starting the Recovery Manager</h4>
- In a separate window launch the <a class="linkscoloured" href="JBossTS_Recovery.html">Recovery Manager</a>,
+ In a separate window launch the <a class="linkscoloured" href="JBossTS_Recovery.html">Recovery Manager</a>,
as follow.
<pre>java com.arjuna.ats.arjuna.recovery.RecoveryManager -test</pre>
-
+
<h4>Launching the demo</h4>
<p>To launch the Test Recovery Module, execute the following java program</p>
-<pre>java com.arjuna.demo.recoverymodule.TestRecoveryModule
+<pre>java com.arjuna.demo.recoverymodule.TestRecoveryModule
[-commit|-abort] [-crash]</pre>
</html>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/xopen_overview.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/xopen_overview.xml 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/docs/xopen_overview.xml 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,11 +16,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
-<page title="Arjuna Technologies Limited: The X/Open DTP model" rootpath="../..">
+<page title="JBossTS Trail map: The X/Open DTP model" rootpath="../..">
<header> Trail map: The X/Open DTP model </header>
<content>
<navigation>
Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/xsl/ATL_LookAndFeel.xsl
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/trailmap/xsl/ATL_LookAndFeel.xsl 2008-07-09 11:35:00 UTC (rev 20976)
+++ labs/jbosstm/trunk/ArjunaJTS/trailmap/xsl/ATL_LookAndFeel.xsl 2008-07-09 15:07:01 UTC (rev 20977)
@@ -2,8 +2,8 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2006, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags.
- See the copyright.txt in the distribution for a full listing
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
@@ -16,7 +16,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-
+
(C) 2005-2006,
@author JBoss Inc.
-->
@@ -33,8 +33,8 @@
<xsl:template match="page">
<HTML>
<HEAD>
- <META name="description" content="Arjuna Technologies: Suppliers of transactioning, messaging, and coordination middleware for reliable distributed systems"/>
- <META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service"/>
+ <META name="description" content="JBossTS: JTA and JTS java transaction system"/>
+ <META name="keywords" content="transactions, transactioning, atomic transaction, OTS, JTA, JTS, BTP, JMS, WS-Coordination, WS-Transaction, BPEL, JAXTX, Activity Service"/>
<TITLE><xsl:value-of select="@title"/></TITLE>
<xsl:element name="LINK">
<xsl:attribute name="href"><xsl:value-of select="$rootpath"/>/styles.css</xsl:attribute>
@@ -78,20 +78,12 @@
<TD width="494">
<xsl:element name="IMG">
<xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/JBoss_DivOfRH_RGB.gif</xsl:attribute>
- <xsl:attribute name="alt">arjuna logo</xsl:attribute>
- <xsl:attribute name="width">178</xsl:attribute>
- <xsl:attribute name="height">63</xsl:attribute>
+ <xsl:attribute name="alt">JBoss logo</xsl:attribute>
+ <xsl:attribute name="width">249</xsl:attribute>
+ <xsl:attribute name="height">78</xsl:attribute>
</xsl:element>
</TD>
- <TD width="233">
- <xsl:element name="IMG">
- <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/arjuna_strapline.gif</xsl:attribute>
- <xsl:attribute name="alt">arjuna strap line</xsl:attribute>
- <xsl:attribute name="width">233</xsl:attribute>
- <xsl:attribute name="height">63</xsl:attribute>
- </xsl:element>
- </TD>
- </TR>
+ </TR>
<xsl:apply-templates select="//page/content/navigation/links[position()=1]" mode="header"/>
</xsl:template>
@@ -192,7 +184,7 @@
<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
<TR>
<TD valign="top" bgcolor="#FFFFFF">
- <xsl:apply-templates mode="nav"/>
+ <xsl:apply-templates mode="nav"/>
</TD>
</TR>
<TR>
@@ -201,8 +193,8 @@
<xsl:attribute name="background"><xsl:value-of select="$rootpath"/>/images/look_and_feel/search_bg.gif</xsl:attribute>
<xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
<xsl:attribute name="class">bodytext</xsl:attribute>
-
- <BR/>
+
+ <BR/>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="4">
<TR>
<TD width="15">
@@ -237,7 +229,7 @@
</TABLE>
</xsl:element>
</TR>
- </TABLE>
+ </TABLE>
</TD>
</TR>
</TABLE>
@@ -279,7 +271,7 @@
<xsl:apply-templates select="document(@include)" mode="nav"/>
</xsl:template>
- <xsl:template match="links[link]|links[abslink]" mode="header">
+ <xsl:template match="links[link]|links[abslink]" mode="header">
<TR>
<TD colspan="2">
<TABLE width="100%" border="0" cellspacing="0" cellpadding="8">
@@ -293,7 +285,7 @@
</TR>
</xsl:template>
- <xsl:template match="links[link]|links[abslink]" mode="nav">
+ <xsl:template match="links[link]|links[abslink]" mode="nav">
<P class="menuheader">
<xsl:value-of select="@title"/>
<DIV class="menuoptions">
@@ -302,13 +294,13 @@
</P>
</xsl:template>
- <xsl:template match="links[news]|links[absnews]" mode="header">
+ <xsl:template match="links[news]|links[absnews]" mode="header">
<xsl:message terminate="yes">
"news/absnews" in header not supported
</xsl:message>
</xsl:template>
- <xsl:template match="links[news]|links[absnews]" mode="nav">
+ <xsl:template match="links[news]|links[absnews]" mode="nav">
<P class="menuheader" valign="top">
<xsl:value-of select="@title"/>
<DIV class="quotetext">
@@ -671,25 +663,10 @@
<TD width="727" valign="top" align="right" colspan="3">
<FONT style="font-family: Arial, Helvetica, sans-serif" size="1">
- Copyright 2002-2005 Arjuna Technologies
-
- <xsl:element name="IMG">
- <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/spacer.jpg</xsl:attribute>
- <xsl:attribute name="alt"></xsl:attribute>
- <xsl:attribute name="border">0</xsl:attribute>
- </xsl:element>
-
+ Copyright 2002-2005 Arjuna Technologies.
+ Copyright 2008 JBoss, a division of Red Hat.
All Rights Reserved.
- <br/><a class="linkscoloured" href="mailto:info at arjuna.com">info at arjuna.com</a>
-
- <xsl:element name="IMG">
- <xsl:attribute name="src"><xsl:value-of select="$rootpath"/>/images/look_and_feel/spacer.jpg</xsl:attribute>
- <xsl:attribute name="alt"></xsl:attribute>
- <xsl:attribute name="border">0</xsl:attribute>
- </xsl:element>
-
- +44 191 243 0676
</FONT>
</TD>
</TR>
More information about the jboss-svn-commits
mailing list