All Examples All EJB Examples This Package
Class examples.ejb.basic.beanManaged.MultiClient
java.lang.Object
|
+----examples.ejb.basic.beanManaged.MultiClient
- public class MultiClient
- extends Object
This class demonstrates calling an entity EJBean
using multiple colocated clients.
After finding the account and checking that its balance
is at least $1,000,000, multiple BigSenders are spawned and
let loose on the account. They withdraw money from the account,
demonstrating the capability of EJBeans to handle
multiple clients simultaneously.
This class also illustrates how to search the JNDI tree
for an appropriate container.
- Author:
- Copyright (c) 1998 by WebLogic, Inc. All Rights Reserved.
- Copyright (c) 1998-1999 by BEA WebXpress. All Rights Reserved.
-
MultiClient()
-
-
getInitialContext()
- Gets an initial context for the current user, password and url.
-
main(String[])
- Runs this example from the command line.
MultiClient
public MultiClient()
main
public static void main(String args[])
- Runs this example from the command line. Example:
java examples.ejb.basic.beanManaged.MultiClient "t3://localhost:7001" scott tiger 10030
The parameters are optional, but if any are supplied,
they are interpreted in this order:
- Parameters:
- url - URL such as "t3://localhost:7001" of Server
- user - User name, default null
- password - User password, default null
- accountID - String Account ID to test, default "10020"
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 EJB Examples This Package