当前位置: 首页>>代码示例>>Java>>正文


Java ObjectAlreadyActive类代码示例

本文整理汇总了Java中org.omg.PortableServer.POAPackage.ObjectAlreadyActive的典型用法代码示例。如果您正苦于以下问题:Java ObjectAlreadyActive类的具体用法?Java ObjectAlreadyActive怎么用?Java ObjectAlreadyActive使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ObjectAlreadyActive类属于org.omg.PortableServer.POAPackage包,在下文中一共展示了ObjectAlreadyActive类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: activate_object

import org.omg.PortableServer.POAPackage.ObjectAlreadyActive; //导入依赖的package包/类
/**
 * <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() ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:POAImpl.java

示例2: activate_object_with_id

import org.omg.PortableServer.POAPackage.ObjectAlreadyActive; //导入依赖的package包/类
/**
 * <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() ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:POAImpl.java

示例3: activateObject

import org.omg.PortableServer.POAPackage.ObjectAlreadyActive; //导入依赖的package包/类
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 ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:POAPolicyMediatorBase_R.java

示例4: activateObject

import org.omg.PortableServer.POAPackage.ObjectAlreadyActive; //导入依赖的package包/类
public void activateObject() throws ObjectAlreadyActive {
     try {
         doIt( ACTIVATE ) ;
     } catch (RuntimeException exc) {
         Throwable thr = exc.getCause() ;
         if (thr instanceof ObjectAlreadyActive)
             throw (ObjectAlreadyActive)thr ;
         else
             throw exc ;
     }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:AOMEntry.java


注:本文中的org.omg.PortableServer.POAPackage.ObjectAlreadyActive类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。