All Examples  All Cluster Examples  This Example

Class examples.cluster.ejb.Client

java.lang.Object
   |
   +----examples.cluster.ejb.Client

public class Client
extends Object
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.

The client demonstrates:

Author:
Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.

Method Index

 o getInitialContext()
Gets an initial context for the current user, password and url.
 o main(String[])
Runs this example from the command line.

Methods

 o main
 public static void main(String args[])
Runs this example from the command line. Example:

java examples.cluster.ejb.Client "t3://localhost:7001" scott tiger

The parameters are optional, but if any are supplied, they are interpreted in this order:

Parameters:
url - URL such as "t3://localhost:7001" of a Server or Cluster
user - User name, default null
password - User password, default null
 o getInitialContext
 public static Context getInitialContext() throws Exception
Gets an initial context for the current user, password and url.

Returns:
Context
Throws: Exception
if there is an error in getting the Context

All Examples  All Cluster Examples  This Example