org.omg.PortableServer.POAPackage.AdapterAlreadyExists Java Examples

The following examples show how to use org.omg.PortableServer.POAPackage.AdapterAlreadyExists. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: POAImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
Example #2
Source File: POAImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
Example #3
Source File: POAImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
Example #4
Source File: POAImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
Example #5
Source File: POAImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
Example #6
Source File: POAImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
Example #7
Source File: POAImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
Example #8
Source File: POAImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
Example #9
Source File: POAImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}
 
Example #10
Source File: POAImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * <code>create_POA</code>
 * <b>Section 3.3.8.2</b>
 */
public POA create_POA(String name, POAManager
    theManager, Policy[] policies) throws AdapterAlreadyExists,
    InvalidPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_POA(name=" + name +
                " theManager=" + theManager + " policies=" + policies +
                ") on poa " + this ) ;
        }

        // We cannot create children of a POA that is (being) destroyed.
        // This has been added to the CORBA 3.0 spec.
        if (state > STATE_RUN)
            throw omgLifecycleWrapper().createPoaDestroy() ;

        POAImpl poa = (POAImpl)(children.get(name)) ;

        if (poa == null) {
            poa = new POAImpl( name, this, getORB(), STATE_START ) ;
        }

        try {
            poa.lock() ;

            if (debug) {
                ORBUtility.dprint( this,
                    "Calling create_POA: new poa is " + poa ) ;
            }

            if ((poa.state != STATE_START) && (poa.state != STATE_INIT))
                throw new AdapterAlreadyExists();

            POAManagerImpl newManager = (POAManagerImpl)theManager ;
            if (newManager == null)
                newManager = new POAManagerImpl( manager.getFactory(),
                    manager.getPIHandler() );

            int defaultCopierId =
                getORB().getCopierManager().getDefaultId() ;
            Policies POAPolicies =
                new Policies( policies, defaultCopierId ) ;

            poa.initialize( newManager, POAPolicies ) ;

            return poa;
        } finally {
            poa.unlock() ;
        }
    } finally {
        unlock() ;
    }
}