All Examples All Jolt Examples This Package
Class examples.jolt.ejb.bankapp.Client
java.lang.Object
|
+----examples.jolt.ejb.bankapp.Client
- public class Client
- extends Object
This class illustrates using a stateful SessionBean that calls
a public Jolt server at //beademo1.beasys.com:8000:
- It creates a teller, and perform repeated deposits and withdraws
- The statefulness of this EJBean is the teller's name
and the current Transaction (if any)
- All calls to the Jolt server are performed by the EJBean
- 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
You'll need to add a Jolt pool to your weblogic.properties file:
# Demo Jolt pool
weblogic.system.startupClass.demojoltpoolStart=\
bea.jolt.pool.servlet.weblogic.PoolManagerStartUp
weblogic.system.startupArgs.demojoltpoolStart=\
poolname=demojoltpool,\
appaddrlist=//beademo1.beasys.com:8000,\
failoverlist=//beademo1.beasys.com:8000,\
minpoolsize=1,\
maxpoolsize=3
weblogic.system.shutdownClass.demojoltpoolStop=\
bea.jolt.pool.servlet.weblogic.PoolManagerShutDown
weblogic.system.shutdownArgs.demojoltpoolStop=\
poolname=demojoltpool
- Author:
- Copyright (c) 1999 by BEA WebXpress, Inc. All Rights Reserved.
-
Client()
-
-
getInitialContext()
- Gets an initial context.
-
main(String[])
- Runs this example from the command line.
Client
public Client()
main
public static void main(String args[])
- Runs this example from the command line. Example:
java examples.jolt.ejb.bankapp.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 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 Jolt Examples This Package