home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-05-08 | 2.4 KB | 69 lines |
- /*
- * Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
- *
- * This SOURCE CODE FILE, which has been provided by Borland as part
- * of a Borland product for use ONLY by licensed users of the product,
- * includes CONFIDENTIAL and PROPRIETARY information of Borland.
- *
- * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
- * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
- * THE PRODUCT.
- *
- * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
- * COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
- * OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
- * OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
- * OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
- * OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
- * CODE FILE.
- */
- //--------------------------------------------------------------------------------------------------
- // CORBA Reference Application
- // Copyright (c) 1997 by Borland International, All Rights Reserved
- //
- // Contains Main Server class for the Server portion of the CORBA
- // Reference Application
- //--------------------------------------------------------------------------------------------------
-
- package borland.reference.creditapproval.server;
-
- /**
- * CreditApprovalServer creates an instance of the credit approval object
- * dispenser and registers it with the ORB.
- */
- public class CreditApprovalServer {
-
- // Used as default if no command-line parameter is specified
- static final int DEFAULT_COUNT = 1;
-
- static public void main(String[] args) {
- int instanceCount;
- try {
- if (args.length == 0)
- instanceCount = DEFAULT_COUNT;
- else
- instanceCount = Integer.parseInt(args[0]);
-
- // Initialize the ORB
- org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
-
- // Initialize the BOA
- org.omg.CORBA.BOA boa = orb.BOA_init();
-
- // Create the Credit Approval Dispenser Class
- CreditApprovalDispenserImpl dispenser = new CreditApprovalDispenserImpl( "Main Dispenser",
- instanceCount );
-
- // Export the dispenser Object
- boa.obj_is_ready( dispenser );
-
- // Service Requests.
- boa.impl_is_ready();
- }
- catch( org.omg.CORBA.SystemException e) {
- System.err.println(e);
- }
- }
- }
-
-