All Examples All EJB Examples This Package
Class examples.ejb.basic.statefulSession.MultiClient
java.lang.Object
|
+----examples.ejb.basic.statefulSession.MultiClient
- public class MultiClient
- extends Object
This class demonstrates calling an statefulsession EJBean
using multiple colocated clients:
- Each thread is a trader, and perform repeated buying and selling of shares
- Persistence of state between calls to the SessionBean;
the client does not do anything to maintain state between calls
- How to search the JNDI tree for an appropriate container
- Application-defined exceptions
- Author:
- Copyright (c) 1999 by BEA Systems, Inc. All Rights Reserved.
-
MultiClient()
-
-
getInitialContext()
- Gets an initial context.
-
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.statefulSession.MultiClient "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 Server
- user - User name, default null
- password - User password, default null
getInitialContext
public static Context getInitialContext() throws Exception
- Gets an initial context.
- Returns:
- Context
- Throws: Exception
- if there is
an error in getting a Context
All Examples All EJB Examples This Package