Examples of NamingContextExt


Examples of org.omg.CosNaming.NamingContextExt

   {
      if (log.isLoggable(Level.FINER)) log.finer("getNamingService() ...");
      if (namingContextExt != null)
         return namingContextExt;

      NamingContextExt nameService = null;
      try {
         // Get a reference to the Name Service, CORBA compliant:
         org.omg.CORBA.Object nameServiceObj = orb.resolve_initial_references("NameService");
         if (nameServiceObj == null) {
            //log.warn(ME + ".NoNameService", "Can't access naming service, is there any running?");
View Full Code Here

Examples of org.omg.CosNaming.NamingContextExt

              
               // NameService entry is e.g. "xmlBlaster.MOM/heron.MOM"
               // where "xmlBlaster.MOM" is a context node and
               // "heron.MOM" is a subnode for each running server (containing the AuthServer POA reference)

               NamingContextExt namingContextExt = getNamingService();
               NameComponent [] nameXmlBlaster = new NameComponent[] { new NameComponent(contextId, contextKind) };
               if (log.isLoggable(Level.FINE)) log.fine("Query NameServer -ORBInitRef NameService=" + glob.getProperty().get("ORBInitRef","") +
                             ((System.getProperty("ORBInitRef.NameService") != null) ? System.getProperty("ORBInitRef.NameService") : "") +
                             " to find the xmlBlaster root context " + OrbInstanceFactory.getString(nameXmlBlaster));
               org.omg.CORBA.Object obj = namingContextExt.resolve(nameXmlBlaster);
               NamingContext relativeContext = org.omg.CosNaming.NamingContextExtHelper.narrow(obj);

               if (relativeContext == null) {
                  throw new Exception("Can't resolve CORBA NameService");
               }
View Full Code Here

Examples of org.omg.CosNaming.NamingContextExt

         catch (NamingException e) {
            throw new Exception("Cannot bind EJBHome in JNDI:\n" + e);
         }
      }

      NamingContextExt corbaContext = null;
      try {
         // Obtain local (in-VM) CORBA naming context
         corbaContext = NamingContextExtHelper.narrow((org.omg.CORBA.Object)
               initialContext.lookup("java:/" +
                                     CorbaNamingService.NAMING_NAME));
View Full Code Here

Examples of org.omg.CosNaming.NamingContextExt

               logger.error("Cannot unbind EJBHome from JNDI", namingException);
            }
         }

         // Get local (in-VM) CORBA naming context
         NamingContextExt corbaContext =
               NamingContextExtHelper.narrow((org.omg.CORBA.Object)
                     initialContext.lookup("java:/"
                                   + CorbaNamingService.NAMING_NAME));

         // Unregister bean home from local CORBA naming context
         try {
            NameComponent[] name = corbaContext.to_name(jndiName);
            corbaContext.unbind(name);
         }
         catch (InvalidName invalidName) {
            logger.error("Cannot unregister EJBHome from CORBA naming service",
                         invalidName);
         }
View Full Code Here

Examples of org.omg.CosNaming.NamingContextExt

    }

    public void unregisterServant(String uri) throws CorbaHostException {
        CorbanameURL details = CorbaHostUtils.getServiceDetails(uri);
        try {
            NamingContextExt namingCtx = getNamingContext(details.getNameService());
            namingCtx.unbind(namingCtx.to_name(details.getName()));
            removeURI(uri);
        } catch (Exception e) {
            handleException(e);
        }
    }
View Full Code Here

Examples of org.omg.CosNaming.NamingContextExt

    public Object lookup(String uri) throws CorbaHostException {
        Object result = null;
        try {
            CorbanameURL url = new CorbanameURL(uri);
            NamingContextExt context = getNamingContext(url.getNameService());
            result = context.resolve_str(url.getName());
        } catch (Exception e) {
            // e.printStackTrace();
            handleException(e);
        }
        if (result == null) {
View Full Code Here

Examples of org.omg.CosNaming.NamingContextExt

            // retrieve the object reference from the NameService because the SecurityInterceptor
            // attached to the main ORB instance may add additional service contexts to the
            // NameService request that will cause failures.  We use one configuration to access
            // the server, and the activate the object on the real one.
            org.omg.CORBA.Object ref = nssORB.string_to_object(nsURI.toString());
            NamingContextExt ic = NamingContextExtHelper.narrow(ref);

            NameComponent[] nameComponent = ic.to_name(name);
            org.omg.CORBA.Object bean = ic.resolve(nameComponent);

            // Ok, now we have an object reference from the naming service, but we need to
            // activate that object on the cssORB instance before we hand it out.  Activating it
            // on the cssORB will ensure that all of the interceptors and policies we define on the
            // cssORB will get used for all requests involving this bean.
View Full Code Here

Examples of org.omg.CosNaming.NamingContextExt

    }

    @Override
    public synchronized void stop(final StopContext context) {
        // Get local (in-VM) CORBA naming context
        final NamingContextExt corbaContext = corbaNamingContext.getValue();

        // Unregister bean home from local CORBA naming context
        try {
            NameComponent[] name = corbaContext.to_name(this.name);
            corbaContext.unbind(name);
        } catch (InvalidName invalidName) {
            EjbLogger.ROOT_LOGGER.cannotUnregisterEJBHomeFromCobra(invalidName);
        } catch (NotFound notFound) {
            EjbLogger.ROOT_LOGGER.cannotUnregisterEJBHomeFromCobra(notFound);
        } catch (CannotProceed cannotProceed) {
View Full Code Here

Examples of org.omg.CosNaming.NamingContextExt

            nc = new NameComponent("ArraysUnions", "");
            path = new NameComponent[] {nc};
            namingContext.rebind(path, arraysUnions);

            NamingContextExt nce = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));

            refArraysSetter = nce.resolve(nce.to_name("ArraysSetter"));
            refPrimitivesSetter = nce.resolve(nce.to_name("PrimitivesSetter"));
            refTestObject = nce.resolve(nce.to_name("TestObject"));
            refCalcObject = nce.resolve(nce.to_name("CalcObject"));
            refObjectManager = nce.resolve(nce.to_name("ObjectManager"));
            refEnumManager = nce.resolve(nce.to_name("EnumManager"));
            refArraysUnions = nce.resolve(nce.to_name("ArraysUnions"));

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.omg.CosNaming.NamingContextExt

                ps.println( orb.object_to_string( transactionService.get_reference() ) );
                ps.close();
            }
            else
            {
                NamingContextExt nc =
        NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));
                NameComponent [] name = new NameComponent[1];
                name[0] = new NameComponent( "TransactionService", "service");
                nc.bind(name, transactionService.get_reference());
            }
            if (logger.isInfoEnabled())
                logger.info("TransactionService up");
        }
        catch ( Exception e )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.