Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
11 Cards in this Set
- Front
- Back
How TransactionManager is configured in Dynamo?
|
TransactionManager object is represented by a Nucleus component, /atg/dynamo/transaction/TransactionManager. Depending on what application server you are running, this component is configured in various ways to point to the appropriate TransactionManager implementation.
Nucleus components can get a pointer directly to the /atg/dynamo/transaction/TransactionManager component. JNDI name dynamo:/atg/dynamo/transaction/TransactionManager. |
|
What object is used by J2EE applications in Dynamo for transaction management?
|
The UserTransaction object is represented in Dynamo by the Nucleus component /atg/dynamo/transaction/UserTransaction. This component actually delegates all of its calls to the /atg/dynamo/transaction/TransactionManager component.
|
|
What is two-phase commit?
|
A two-phase commit is comprised of two stages:
● prepare: The transaction instructs each resource to prepare itself for a commit. If any resource responds with a rollback during the prepare phase, all resources are immediately rolled back and the transaction ends ● commit : If all resources vote to commit, the transaction instructs each resource to commit. |
|
What is Simulating Two-Phase Commit?
|
Resources can simulate two-phase behavior. This allows JDBC drivers that do not support the two-phase commit protocol to work with the application server’s two-phase commit mechanism. A resource can simulate the two-phase protocol by committing in the prepare phase, and ignoring the commit phase. If the commit succeeds, the resource votes to commit, otherwise the resource votes to rollback.
|
|
What are the transaction modes?
|
> Required
> RequiresNew > NotSupported > Supports > Mandatory > Never |
|
Demarcation in Pages?
|
● dsp:beginTransaction initiates a transaction and tracks its status.
● dsp:commitTransaction commits the current transaction. ● dsp:demarcateTransaction begins a transaction, executes one or more operations within the transaction, and then commits the transaction. ● dsp:rollbackTransaction rolls back the current transaction. ● dsp:setTransactionRollbackOnly marks the current transaction for rollback only. ● dsp:transactionStatus returns the status of the current transaction. |
|
Transaction Servlet Bean
|
<dsp:droplet name="/atg/dynamo/transaction/droplet/Transaction">
<dsp:param name="transAttribute" value="requiresNew"/> <dsp:oparam name="output"> ... portion of page executed in demarcated area ... </dsp:oparam> </dsp:droplet> |
|
Ending Transactions Early on the page
|
<dsp:droplet name="/atg/dynamo/transaction/droplet/EndTransaction">
<dsp:param name="op" value="commit"/> <dsp:oparam name="successOutput"> The transaction ended successfully! </dsp:oparam> <dsp:oparam name="errorOutput"> The transaction failed with reason: <dsp:valueof param="errorMessage"/> </dsp:oparam> </dsp:droplet> |
|
Classes that you can use to demarcate transactions in code
|
● atg.dtm.UserTransactionDemarcation can be used by J2EE components and Nucleus components to perform basic transaction demarcation. This class accesses the UserTransaction object to perform its operations.
● atg.dtm.TransactionDemarcation can be used by Nucleus components to demarcate areas of code at a fine granularity. J2EE components cannot use this class, because it accesses the TransactionManager object directly. |
|
How to start a transaction using the TransactionDemarcation class?
|
The begin() method takes two arguments. The first argument is the TransactionManager object. The second argument specifies one of the 6 transaction modes: REQUIRED, REQUIRES_NEW, SUPPORTS, NOT_SUPPORTED, MANDATORY, or NEVER. If the second argument is not supplied, it defaults to REQUIRED.
|
|
Difference between RepositoryFormHandler and TransactionalRepositoryFormHandler?
|
TransactionalRepositoryFormHandler extends RepositoryFormHandler. In RepositoryFormHandler ransaction starts when a submit handler is invoked and ends when it completes.
Transactions in the TransactionalRepositoryFormHandler begin in beforeSet and end with the afterSet: ● beforeSet method executes ● processing of all other tags in the JSP (tags that implement submit operations have the lowest priority on the page) ● submit handler method data validation ● submit handler method data commit ● afterSet method execution |