code: public void run() {
  
          try {
              if (!ApiUtil.in_server()) {
                  // We need to serialize here as the event subscription
                  // thread needs also to access the poa
                  synchronized (this) {
                      org.omg.CORBA.Object obj =
                              orb.resolve_initial_references("RootPOA");
                      org.omg.PortableServer.POA poa =
                              org.omg.PortableServer.POAHelper.narrow(obj);
                      org.omg.PortableServer.POAManager pman =
                              poa.the_POAManager();
                      pman.activate();
                  }
                  orbRunning = true;
                  orb.run();
                  orb.destroy();
              }
          } catch (org.omg.CORBA.UserException ex) {
              System.err.println("EventConsumer.run() : Unable to start orb");
              ex.printStackTrace();
              System.exit(1);
          }
  
      }
docs: ===============================================================