Java 类java.rmi.activation.Activator 实例源码

项目:cn1    文件:Rmid.java   
public ActivationID registerObject(ActivationDesc adesc) {
    waitStartup();
    // rmi.log.4B=ActivationSystemImpl.registerObject():
    rLog.log(commonDebugLevel,Messages.getString("rmi.log.4B")); //$NON-NLS-1$
    ActivationGroupID agid = adesc.getGroupID();
    // rmi.log.4C=agid : {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4C", agid)); //$NON-NLS-1$
    // rmi.log.4D=Activator stub = {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4D", thisStub)); //$NON-NLS-1$
    ActivationID aid = new ActivationID((Activator) thisStub);
    // rmi.log.4E=aid : {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4E", aid)); //$NON-NLS-1$
    // rmi.log.4C=agid : {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4C", agid)); //$NON-NLS-1$

    ActivationGroupInfo info = (ActivationGroupInfo) groupInfoByGroupId
            .get(agid);
    // rmi.log.50=ActivationGroupInfo = {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.50", info)); //$NON-NLS-1$

    info.registerObject(aid, adesc);
    // rmi.log.51=Activation desc was added.
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.51")); //$NON-NLS-1$
    return aid;

}
项目:freeVM    文件:Rmid.java   
public ActivationID registerObject(ActivationDesc adesc) {
    waitStartup();
    // rmi.log.4B=ActivationSystemImpl.registerObject():
    rLog.log(commonDebugLevel,Messages.getString("rmi.log.4B")); //$NON-NLS-1$
    ActivationGroupID agid = adesc.getGroupID();
    // rmi.log.4C=agid : {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4C", agid)); //$NON-NLS-1$
    // rmi.log.4D=Activator stub = {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4D", thisStub)); //$NON-NLS-1$
    ActivationID aid = new ActivationID((Activator) thisStub);
    // rmi.log.4E=aid : {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4E", aid)); //$NON-NLS-1$
    // rmi.log.4C=agid : {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4C", agid)); //$NON-NLS-1$

    ActivationGroupInfo info = (ActivationGroupInfo) groupInfoByGroupId
            .get(agid);
    // rmi.log.50=ActivationGroupInfo = {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.50", info)); //$NON-NLS-1$

    info.registerObject(aid, adesc);
    // rmi.log.51=Activation desc was added.
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.51")); //$NON-NLS-1$
    return aid;

}
项目:freeVM    文件:Rmid.java   
public ActivationID registerObject(ActivationDesc adesc) {
    waitStartup();
    // rmi.log.4B=ActivationSystemImpl.registerObject():
    rLog.log(commonDebugLevel,Messages.getString("rmi.log.4B")); //$NON-NLS-1$
    ActivationGroupID agid = adesc.getGroupID();
    // rmi.log.4C=agid : {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4C", agid)); //$NON-NLS-1$
    // rmi.log.4D=Activator stub = {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4D", thisStub)); //$NON-NLS-1$
    ActivationID aid = new ActivationID((Activator) thisStub);
    // rmi.log.4E=aid : {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4E", aid)); //$NON-NLS-1$
    // rmi.log.4C=agid : {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.4C", agid)); //$NON-NLS-1$

    ActivationGroupInfo info = (ActivationGroupInfo) groupInfoByGroupId
            .get(agid);
    // rmi.log.50=ActivationGroupInfo = {0}
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.50", info)); //$NON-NLS-1$

    info.registerObject(aid, adesc);
    // rmi.log.51=Activation desc was added.
    rLog.log(commonDebugLevel, Messages.getString("rmi.log.51")); //$NON-NLS-1$
    return aid;

}
项目:OpenJSharp    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:jdk8u-jdk    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:openjdk-jdk10    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:openjdk9    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:jdk8u_jdk    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:infobip-open-jdk-8    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:jdk8u-dev-jdk    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:jdk7-jdk    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:openjdk-source-code-learn    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:OLD-OpenJDK8    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:openjdk-jdk7u-jdk    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}
项目:openjdk-icedtea7    文件:Activation.java   
/**
 * Initialize the Activation instantiation; start activation
 * services.
 */
private void init(int port,
                  RMIServerSocketFactory ssf,
                  ReliableLog log,
                  String[] childArgs)
    throws Exception
{
    // initialize
    this.log = log;
    numUpdates = 0;
    shutdownHook =  new ShutdownHook();
    groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
    groupCounter = 0;
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    // Use array size of 0, since the value from calling size()
    // may be out of date by the time toArray() is called.
    ActivationGroupID[] gids =
        groupTable.keySet().toArray(new ActivationGroupID[0]);

    synchronized (startupLock = new Object()) {
        // all the remote methods briefly synchronize on startupLock
        // (via checkShutdown) to make sure they don't happen in the
        // middle of this block.  This block must not cause any such
        // incoming remote calls to happen, or deadlock would result!
        activator = new ActivatorImpl(port, ssf);
        activatorStub = (Activator) RemoteObject.toStub(activator);
        system = new ActivationSystemImpl(port, ssf);
        systemStub = (ActivationSystem) RemoteObject.toStub(system);
        monitor = new ActivationMonitorImpl(port, ssf);
        initCommand(childArgs);
        registry = new SystemRegistryImpl(port, null, ssf, systemStub);

        if (ssf != null) {
            synchronized (initLock) {
                initDone = true;
                initLock.notifyAll();
            }
        }
    }
    startupLock = null;

    // restart services
    for (int i = gids.length; --i >= 0; ) {
        try {
            getGroupEntry(gids[i]).restartServices();
        } catch (UnknownGroupException e) {
            System.err.println(
                getTextResource("rmid.restart.group.warning"));
            e.printStackTrace();
        }
    }
}