|
WebLogic Server 6.0 Code Examples, BEA Systems, Inc. | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--examples.cluster.ejb.Client
This class illustrates load balancing and failover using a container-managed JDBC EntityBean. You'll need to have a properly configured database with the appropriate tables loaded before running this example. This class has the following cycle:
The client demonstrates:
Inner Class Summary | |
(package private) class |
Client.Balance
Performs a balance lookup. |
(package private) class |
Client.Deposit
Performs a deposit. |
(package private) class |
Client.Transaction
Inner class that is used to call the transactions with the session beans. |
(package private) class |
Client.Transfer
Performs a transfer. |
(package private) class |
Client.Withdrawal
Performs a withdrawal. |
Field Summary | |
(package private) static java.lang.String |
account1
|
(package private) static java.lang.String |
account2
|
(package private) static TellerHome |
bank
|
(package private) static int |
i
|
(package private) static int |
ITERATIONS
|
(package private) static int |
MAXATTEMPTS
|
(package private) static int |
SLEEP
|
(package private) static ClusterUtils |
stats
|
(package private) static Teller |
teller
|
(package private) static int |
trans
|
(package private) static java.lang.String |
url
|
Constructor Summary | |
(package private) |
Client()
|
Method Summary | |
static javax.naming.Context |
getInitialContext()
Gets an initial context for the URL. |
static void |
main(java.lang.String[] args)
Runs this example from the command line. |
Methods inherited from class java.lang.Object |
|
Field Detail |
static java.lang.String account1
static java.lang.String account2
static TellerHome bank
static int i
static int ITERATIONS
static final int MAXATTEMPTS
static final int SLEEP
static ClusterUtils stats
static Teller teller
static int trans
static java.lang.String url
Constructor Detail |
Client()
Method Detail |
public static javax.naming.Context getInitialContext() throws java.lang.Exception
java.lang.Exception
- if there is
an error in getting the Contextpublic static void main(java.lang.String[] args)
java examples.cluster.ejb.Client "t3://localhost:7001"
The parameters are optional, but if any are supplied, they are interpreted in this order:
url
- URL such as "t3://localhost:7001" of a Server or Cluster
|
Documentation is available at http://e-docs.bea.com/wls/docs60 |
|||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |