samples.j2ee.ejb.sequence.oracle
Class Client

java.lang.Object
  |
  +--samples.j2ee.ejb.sequence.oracle.Client

public class Client
extends java.lang.Object

This class demonstrates calling an entity EJBean, followed by creating two new employees with a salary and an automatically generated primary key.

This class also illustrates how to search the JNDI tree for an appropriate container.


Constructor Summary
Client()
           
 
Method Summary
static void main(java.lang.String[] args)
          Runs this example from the command line.
static javax.naming.Context newInitialContext()
          Gets an initial context for the current user, password and url.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client()
Method Detail

main

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

java samples.j2ee.ejb.sequence.oracle.Client "corbaloc://localhost:7001" scott tiger

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

Parameters:
url - URL such as "corbaloc://localhost:7001" of Server
user - Database user name, default is scott
password - Database user password, default is tiger

newInitialContext

public static javax.naming.Context newInitialContext()
Gets an initial context for the current user, password and url.
Returns:
Context