org.omg.PortableServer.POAPackage.ServantAlreadyActive Java Examples

The following examples show how to use org.omg.PortableServer.POAPackage.ServantAlreadyActive. 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 openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #2
Source File: POAImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #3
Source File: POAImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #4
Source File: POAPolicyMediatorBase_R.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}
 
Example #5
Source File: POAImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #6
Source File: POAImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #7
Source File: POAImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #8
Source File: POAPolicyMediatorBase_R.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}
 
Example #9
Source File: POAPolicyMediatorBase_R.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}
 
Example #10
Source File: POAImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #11
Source File: POAImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #12
Source File: POAImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #13
Source File: POAPolicyMediatorBase_R.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}
 
Example #14
Source File: POAImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #15
Source File: POAImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #16
Source File: POAImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #17
Source File: POAPolicyMediatorBase_R.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}
 
Example #18
Source File: POAImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #19
Source File: POAImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #20
Source File: POAImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #21
Source File: POAPolicyMediatorBase_R.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}
 
Example #22
Source File: POAPolicyMediatorBase_R.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}
 
Example #23
Source File: POAImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #24
Source File: POAImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #25
Source File: POAPolicyMediatorBase_R.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}
 
Example #26
Source File: POAPolicyMediatorBase_R.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}
 
Example #27
Source File: POAImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #28
Source File: POAImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object</code>
 * <b>Section 3.3.8.14</b>
 */
public byte[] activate_object(Servant servant)
    throws ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object on poa " + this +
                " (servant=" + servant + ")" ) ;
        }

        // Allocate a new system-generated object-id.
        // This will throw WrongPolicy if not SYSTEM_ID
        // policy.
        byte[] id = mediator.newSystemId();

        try {
            mediator.activateObject( id, servant ) ;
        } catch (ObjectAlreadyActive oaa) {
            // This exception can not occur in this case,
            // since id is always brand new.
            //
        }

        return id ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #29
Source File: POAImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <code>activate_object_with_id</code>
 * <b>Section 3.3.8.15</b>
 */
public void activate_object_with_id(byte[] id,
                                                 Servant servant)
    throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling activate_object_with_id on poa " + this +
                " (servant=" + servant + " id=" + id + ")" ) ;
        }

        // Clone the id to avoid possible errors due to aliasing
        // (e.g. the client passes the id in and then changes it later).
        byte[] idClone = (byte[])(id.clone()) ;

        mediator.activateObject( idClone, servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting activate_object_with_id on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #30
Source File: POAPolicyMediatorBase_R.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public final void activateObject(byte[] id, Servant servant)
    throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive
{
    if (isUnique && activeObjectMap.contains(servant))
        throw new ServantAlreadyActive();
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;

    AOMEntry entry = activeObjectMap.get( key ) ;

    // Check for an ObjectAlreadyActive error
    entry.activateObject() ;
    activateServant( key, entry, servant ) ;
}