Examples of POAManager


Examples of org.apache.yoko.orb.OBPortableServer.POAManager

                throw new org.omg.PortableServer.POAPackage.AdapterAlreadyExists();

            //
            // If necessary create a new POAManager for this POA
            //
            POAManager obmanager = null;
            if (manager == null) {
                try {
                    org.apache.yoko.orb.OB.InitialServiceManager ism = orbInstance_
                            .getInitialServiceManager();
                    POAManagerFactory factory = POAManagerFactoryHelper
                            .narrow(ism
                                    .resolveInitialReferences("POAManagerFactory"));
                    org.omg.CORBA.Policy[] emptyPl = new org.omg.CORBA.Policy[0];
                    obmanager = (org.apache.yoko.orb.OBPortableServer.POAManager) factory
                            .create_POAManager("", emptyPl);
                } catch (org.omg.CORBA.ORBPackage.InvalidName ex) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(false);
                } catch (org.omg.PortableServer.POAManagerFactoryPackage.ManagerAlreadyExists ex) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(false);
                }
                // catch(org.apache.yoko.orb.OCI.InvalidParam ex)
                // {
                // org.apache.yoko.orb.OB.Assert._OB_assert(false);
                // }
                catch (org.omg.CORBA.PolicyError ex) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(false);
                }
            } else {
                try {
                    obmanager = POAManagerHelper.narrow(manager);
                } catch (org.omg.CORBA.BAD_PARAM ex) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(false);
                }
            }

            //
            // Create the new POA
            //
            try {
                child = new POA_impl(orb_, orbInstance_, serverId_, adapter,
                        this, obmanager, poaCurrent_, ociCurrent_, policies,
                        rawPolicies);
            } catch (org.omg.CORBA.SystemException ex) {
                //
                // If the creation of the POA fails and a new POAManager
                // was created the deactivate the POAManager
                //
                if (manager == null) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(obmanager != null);
                    try {
                        obmanager.deactivate(true, true);
                    } catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive e) {
                    }
                }
                throw ex;
            }
View Full Code Here

Examples of org.apache.yoko.orb.OBPortableServer.POAManager

    private void validateName(String name)
            throws org.omg.PortableServer.POAManagerFactoryPackage.ManagerAlreadyExists {
        //
        // Does the POAManager exist?
        //
        POAManager manager = (POAManager) managers_.get(name);
        if (manager != null) {
            //
            // If the POAManager is INACTIVE then remove it from
            // the list, and allow the user to re-add the
            // POAManager
            //
            if (manager.get_state() == org.omg.PortableServer.POAManagerPackage.State.INACTIVE)
                managers_.remove(name);
            else
                throw new org.omg.PortableServer.POAManagerFactoryPackage.ManagerAlreadyExists();
        }
    }
View Full Code Here

Examples of org.apache.yoko.orb.OBPortableServer.POAManager

            // Create the new POAManager_impl and add to the table
            //
            org.apache.yoko.orb.OCI.Acceptor[] arr = new org.apache.yoko.orb.OCI.Acceptor[acceptors
                    .size()];
            acceptors.copyInto(arr);
            POAManager manager = new POAManager_impl(orbInstance_, poaLocator_,
                    id, Integer.toString(count_), arr, tmpPolicies);
            managers_.put(id, manager);

            return manager;
        }
View Full Code Here

Examples of org.apache.yoko.orb.OBPortableServer.POAManager

        java.util.Enumeration e = managers_.keys();
        java.util.Vector result = new java.util.Vector();

        while (e.hasMoreElements()) {
            String name = (String) e.nextElement();
            POAManager manager = (org.apache.yoko.orb.OBPortableServer.POAManager) managers_
                    .get(name);
            if (manager != null)
                result.addElement(manager);
        }
View Full Code Here

Examples of org.apache.yoko.orb.OBPortableServer.POAManager

        // Deactivate each of the POAManagers
        //
        java.util.Enumeration e = managers_.keys();
        while (e.hasMoreElements()) {
            String name = (String) e.nextElement();
            POAManager manager = (POAManager) managers_.get(name);
            if (manager != null) {
                try {
                    manager.deactivate(true, true);
                } catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive ex) {
                    // Ignore
                }
            }
        }
View Full Code Here

Examples of org.apache.yoko.orb.OBPortableServer.POAManager

    private void validateName(String name)
            throws org.omg.PortableServer.POAManagerFactoryPackage.ManagerAlreadyExists {
        //
        // Does the POAManager exist?
        //
        POAManager manager = (POAManager) managers_.get(name);
        if (manager != null) {
            //
            // If the POAManager is INACTIVE then remove it from
            // the list, and allow the user to re-add the
            // POAManager
            //
            if (manager.get_state() == org.omg.PortableServer.POAManagerPackage.State.INACTIVE)
                managers_.remove(name);
            else
                throw new org.omg.PortableServer.POAManagerFactoryPackage.ManagerAlreadyExists();
        }
    }
View Full Code Here

Examples of org.apache.yoko.orb.OBPortableServer.POAManager

            // Create the new POAManager_impl and add to the table
            //
            org.apache.yoko.orb.OCI.Acceptor[] arr = new org.apache.yoko.orb.OCI.Acceptor[acceptors
                    .size()];
            acceptors.copyInto(arr);
            POAManager manager = new POAManager_impl(orbInstance_, poaLocator_,
                    id, Integer.toString(count_), arr, tmpPolicies);
            managers_.put(id, manager);

            return manager;
        }
View Full Code Here

Examples of org.apache.yoko.orb.OBPortableServer.POAManager

        java.util.Enumeration e = managers_.keys();
        java.util.Vector result = new java.util.Vector();

        while (e.hasMoreElements()) {
            String name = (String) e.nextElement();
            POAManager manager = (org.apache.yoko.orb.OBPortableServer.POAManager) managers_
                    .get(name);
            if (manager != null)
                result.addElement(manager);
        }
View Full Code Here

Examples of org.apache.yoko.orb.OBPortableServer.POAManager

        // Deactivate each of the POAManagers
        //
        java.util.Enumeration e = managers_.keys();
        while (e.hasMoreElements()) {
            String name = (String) e.nextElement();
            POAManager manager = (POAManager) managers_.get(name);
            if (manager != null) {
                try {
                    manager.deactivate(true, true);
                } catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive ex) {
                    // Ignore
                }
            }
        }
View Full Code Here

Examples of org.apache.yoko.orb.OBPortableServer.POAManager

                throw new org.omg.PortableServer.POAPackage.AdapterAlreadyExists();

            //
            // If necessary create a new POAManager for this POA
            //
            POAManager obmanager = null;
            if (manager == null) {
                try {
                    org.apache.yoko.orb.OB.InitialServiceManager ism = orbInstance_
                            .getInitialServiceManager();
                    POAManagerFactory factory = POAManagerFactoryHelper
                            .narrow(ism
                                    .resolveInitialReferences("POAManagerFactory"));
                    org.omg.CORBA.Policy[] emptyPl = new org.omg.CORBA.Policy[0];
                    obmanager = (org.apache.yoko.orb.OBPortableServer.POAManager) factory
                            .create_POAManager("", emptyPl);
                } catch (org.omg.CORBA.ORBPackage.InvalidName ex) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(false);
                } catch (org.omg.PortableServer.POAManagerFactoryPackage.ManagerAlreadyExists ex) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(false);
                }
                // catch(org.apache.yoko.orb.OCI.InvalidParam ex)
                // {
                // org.apache.yoko.orb.OB.Assert._OB_assert(false);
                // }
                catch (org.omg.CORBA.PolicyError ex) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(false);
                }
            } else {
                try {
                    obmanager = POAManagerHelper.narrow(manager);
                } catch (org.omg.CORBA.BAD_PARAM ex) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(false);
                }
            }

            //
            // Create the new POA
            //
            try {
                child = new POA_impl(orb_, orbInstance_, serverId_, adapter,
                        this, obmanager, poaCurrent_, ociCurrent_, policies,
                        rawPolicies);
            } catch (org.omg.CORBA.SystemException ex) {
                //
                // If the creation of the POA fails and a new POAManager
                // was created the deactivate the POAManager
                //
                if (manager == null) {
                    org.apache.yoko.orb.OB.Assert._OB_assert(obmanager != null);
                    try {
                        obmanager.deactivate(true, true);
                    } catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive e) {
                    }
                }
                throw ex;
            }
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.