aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/example/corba/StockServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/jdbc/example/corba/StockServer.java')
-rw-r--r--src/interfaces/jdbc/example/corba/StockServer.java58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/interfaces/jdbc/example/corba/StockServer.java b/src/interfaces/jdbc/example/corba/StockServer.java
deleted file mode 100644
index 18c8b893faa..00000000000
--- a/src/interfaces/jdbc/example/corba/StockServer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package example.corba;
-
-import org.omg.CosNaming.*;
-
-/*
- * This class implements the server side of the example.
- *
- * $PostgreSQL: pgsql/src/interfaces/jdbc/example/corba/StockServer.java,v 1.6 2003/11/29 22:41:21 pgsql Exp $
- */
-public class StockServer
-{
- public static void main(String[] args)
- {
- int numInstances = 3;
-
- try
- {
- // Initialise the ORB
- org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, null);
-
- // Create the StockDispenser object
- StockDispenserImpl dispenser = new StockDispenserImpl(args, "Stock Dispenser", numInstances);
-
- // Export the new object
- orb.connect(dispenser);
-
- // Get the naming service
- org.omg.CORBA.Object nameServiceObj = orb.resolve_initial_references("NameService");
- if (nameServiceObj == null)
- {
- System.err.println("nameServiceObj = null");
- return ;
- }
-
- org.omg.CosNaming.NamingContext nameService = org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj);
- if (nameService == null)
- {
- System.err.println("nameService = null");
- return ;
- }
-
- // bind the dispenser into the naming service
- NameComponent[] dispenserName = {
- new NameComponent("StockDispenser", "Stock")
- };
- nameService.rebind(dispenserName, dispenser);
-
- // Now wait forever for the current thread to die
- Thread.currentThread().join();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-}
-
-