examples.cluster.ejb
Class Client.Transaction
java.lang.Object
|
+--examples.cluster.ejb.Client.Transaction
- Direct Known Subclasses:
- Client.Balance, Client.Deposit, Client.Transfer, Client.Withdrawal
- Enclosing class:
- Client
- class Client.Transaction
- extends java.lang.Object
Inner class that is used to call the transactions
with the session beans.
Subclassed to perform specific transaction types.
Method Summary |
(package private) void |
buildReport()
Builds a report of the result of a transaction. |
(package private) java.lang.String |
getTransactionID()
Builds a unique identifier for the transaction. |
(package private) void |
invokeTransaction()
Calls a TellerBean to perform a transaction. |
(package private) void |
printReport()
Prints a report of the result of a transaction. |
(package private) void |
transaction()
Loop that attempts to invoke a transaction
on a TellerBean. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
account1Balance
double account1Balance
account1Id
java.lang.String account1Id
account1Message
java.lang.String account1Message
account1Server
java.lang.String account1Server
account2Balance
double account2Balance
account2Id
java.lang.String account2Id
account2Message
java.lang.String account2Message
account2Server
java.lang.String account2Server
actionMessage
java.lang.String actionMessage
amount
double amount
result
TellerResult result
tellerMessage
java.lang.String tellerMessage
tellerServer
java.lang.String tellerServer
transId
java.lang.String transId
Client.Transaction
Client.Transaction()
buildReport
void buildReport()
- Builds a report of the result of a transaction.
Subclassed in specific transaction types.
getTransactionID
java.lang.String getTransactionID()
- Builds a unique identifier for the transaction.
- Returns:
- string transaction ID
invokeTransaction
void invokeTransaction()
throws TellerException,
java.rmi.RemoteException
- Calls a TellerBean to perform a transaction.
Subclassed in specific transaction types.
- Throws:
TellerException
- if there is
an error in performing the transactionjava.rmi.RemoteException
- if there is
a communications or systems failure
printReport
void printReport()
- Prints a report of the result of a transaction.
transaction
void transaction()
throws java.lang.Exception,
TellerException,
java.rmi.RemoteException,
javax.ejb.CreateException
- Loop that attempts to invoke a transaction
on a TellerBean. It will catch any RemoteExceptions
from the TellerBean, and after checking if the
transaction was committed, will either return, or
-- if the MAXATTEMPTS has not been exceeded --
attempt the transaction again.
- Throws:
java.lang.Exception
- if the transaction is not
completed in the MAXATTEMPTSTellerException
- if there is
an error in performing the transactionjava.rmi.RemoteException
- if there is
a communications or systems failurejavax.ejb.CreateException
- if there is
a problem creating a teller
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.