Examples of RMIClient


Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

     * Shutdown the J2EE PE/RI server. Called when "PEMain stop" is invoked,
     * in a "client" VM. Does a remote invocation on the server.
     */
    public static void shutdown() {
  try {
      RMIClient rmiClient = new RMIClient(
            true,
            getStubFilePath(),
            getSeedFilePath());

      ShutdownEvent shutdownEvent = new ShutdownEvent(SERVER_INSTANCE, "true");
      getLogger().log(Level.INFO,
          "sending notification to server..." +
          SERVER_INSTANCE);
      AdminEventResult result = rmiClient.sendNotification(shutdownEvent);
      getLogger().log(Level.INFO,
          "server.shutdown_complete");

  } catch(Exception e) {
      getLogger().log(Level.SEVERE, "j2eerunner.initError", e);
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

     * Get status of the instance.
     */
    private static int getInstanceStatus() {
        String stubFile = getStubFilePath();
        String seedFile = getSeedFilePath();
        RMIClient rmiClient = new RMIClient(true, stubFile, seedFile);
        return rmiClient.getInstanceStatusCode();
    }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

        //is instance stopped, return false;
        //is instance restarted after changes, return false;
        // return true;
        synchronized(lock) {
        try {
            RMIClient rc = AdminChannel.getRMIClient(this.mLogicalName);
            if(!rc.isAlive()) return false;
            if(rc.hasRestartedSince(getManualChangeTime())) return false;
           
            return true;
        } catch (Exception e) {
            //ignore
        }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

     *
     * @deprecated Use runtime status object to runtime status
     */
    public boolean isrestartRequired() {
        String instanceId = AdminService.getAdminService().getInstanceName();
        RMIClient rc = AdminChannel.getRMIClient(instanceId);

        return rc.isRestartNeeded();
    }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

    public void stopInstance(String stopInstancesOverride) throws InstanceException
    {
        if(!isStoppable())
            return;

        RMIClient rmiClient = getRMIClient();
        String instanceName = getConfig().getInstanceName();
       
        // domains set the instance name to "server" -- but not in the RepositoryConfig
        if(!ok(instanceName))
            instanceName = "server";
       
      ShutdownEvent shutdownEvent = new ShutdownEvent(instanceName, stopInstancesOverride);
      AdminEventResult result = rmiClient.sendNotification(shutdownEvent);
        waitUntilStopped(60);
        postStop();
    }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

    public boolean stopInstanceWithinTime(int timeout) throws InstanceException
    {
        if(!isStoppable())
            return true;

         RMIClient rmiClient = getRMIClient();
        String instanceName = getConfig().getInstanceName();
       
        // domains set the instance name to "server" -- but not in the RepositoryConfig
        if(!ok(instanceName))
            instanceName = "server";
       
  ShutdownEvent shutdownEvent = new ShutdownEvent(instanceName, "true");
  AdminEventResult result = rmiClient.sendNotification(shutdownEvent);
        waitUntilStopped(timeout);
        if (isInstanceNotRunning()) {
            postStop();
            return true;
        } else return false;
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

    {
        if (rmiClient == null)
        {
            String stubPath = getFileLayout().getStubFile().getAbsolutePath();
            String seedPath = getFileLayout().getSeedFile().getAbsolutePath();
            rmiClient = new RMIClient(false, stubPath, seedPath);
        }
        return rmiClient;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

     * @param instanceName name of the instance
     */
    AdminEventCache(String instanceName) {
        this.instanceName = instanceName;
        cache = new ArrayList();
        RMIClient channel = AdminChannel.getRMIClient(instanceName);
        if (channel.isRestartNeeded()) {
            setRestartNeededTrue(false);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

     */
    private void setRestartNeededTrue(boolean notifyInstance) {
        restartNeeded = true;
        tsRestartNeededSince = System.currentTimeMillis();
        if (notifyInstance) {
            RMIClient channel = AdminChannel.getRMIClient(instanceName);
            channel.setRestartNeeded(true);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.channel.RMIClient

     * @param restart    boolen value for restart required flag
     */
    public void setRestartRequired(String inst, boolean restart) {

        try {
            RMIClient client = AdminChannel.getRMIClient(inst);
            if (client == null) {
                _logger.log(Level.INFO, "event.rmi_client_not_found");
            } else {
                client.setRestartNeeded(restart);
            }
        } catch (Throwable t) {
            _logger.log(Level.INFO,
                "event.exception_during_restart_reset", t);
        }
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.