WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.ejb20.relationships.many2many
Class Client

java.lang.Object
  |
  +--examples.ejb20.relationships.many2many.Client

public class Client
extends java.lang.Object

This class demonstrates CMP relationships and EJB-QL by performing the following:

Finally, remove all newly created accounts.

This class also illustrates how to lookup an EJB home in the JNDI tree.

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

Constructor Summary
Client(java.lang.String url)
           
 
Method Summary
static void main(java.lang.String[] args)
          Runs this example from the command line.
 void runExample()
          Create 5 new accounts and customers, with different initial balances and type.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client(java.lang.String url)
       throws javax.naming.NamingException
Method Detail

main

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

java examples.ejb20.relationships.many2many.Client "t3://localhost:7001" 10020

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

runExample

public void runExample()
                throws javax.ejb.CreateException,
                       java.rmi.RemoteException,
                       javax.ejb.FinderException,
                       javax.ejb.RemoveException
Create 5 new accounts and customers, with different initial balances and type. Find all the accounts with a balance greater than a specific value. When finished, remove the new accounts.

Documentation is available at
http://e-docs.bea.com/wls/docs60

Copyright © 2000 BEA Systems, Inc. All Rights Reserved.