Package com.sun.enterprise.instance

Examples of com.sun.enterprise.instance.InstanceEnvironment


        }
        String wsdlFileLocation = null;
        try
        {
            ConfigContext serverContext = getConfigContext(mInstanceName);
            InstanceEnvironment iEnv = new InstanceEnvironment(mInstanceName);
            Applications applicationsConfigBean =
                (Applications) ConfigBeansFactory.getConfigBeanByXPath(
                    serverContext, ServerXPathHelper.XPATH_APPLICATIONS);
            String appLocation = null;
            AbstractArchive moduleArchive = null;
View Full Code Here


        if (targetName != null) {
            event.setTargetDestination(targetName);
        }

        /* New for 8.0 - temporary */
        this.transform(new InstanceEnvironment(name));
        /* New for 8.0 - temporary */

        if (event instanceof ApplicationDeployEvent
                || event instanceof ModuleDeployEvent) {
            AdminEventCache.populateConfigChange(getConfigContext(), event);
View Full Code Here

    // ****************************************************************************
    //Security Realms keyfile operations
    // ****************************************************************************
    private FileRealm getInstanceRealmKeyFile() throws MBeanConfigException
    {
        InstanceEnvironment env = new InstanceEnvironment(mInstanceName);
        try
        {
            return new FileRealm(env.getBackupRealmsKeyFilePath());
        }
        catch(BadRealmException bre)
        {
            //String msg =  localStrings.getString( "admin.server.core.mbean.config.bad_realm", mInstanceName);
            throw new MBeanConfigException(bre.getMessage());
View Full Code Here

        }

    }
    private void saveInstanceRealmKeyFile(FileRealm realm) throws MBeanConfigException
    {
        InstanceEnvironment env = new InstanceEnvironment(mInstanceName);
        try
        {
            final String filePath = env.getBackupRealmsKeyFilePath();
            sLogger.log(Level.INFO, "filerealm.write", filePath);
            realm.writeKeyFile(filePath);
        }
        catch(IOException ioe)
        {
View Full Code Here

    /**
     * Returns Instance dir path
     */
    public String getInstanceRoot()
    {
        InstanceEnvironment env = new InstanceEnvironment(mInstanceName);
        return env.getInstancesRoot();
    }
View Full Code Here

    public String[] getSecurityPasswordTokens() throws ControlException
    {
        try
        {
            //first testing existance of password file
            InstanceEnvironment env = new InstanceEnvironment(mInstanceName);
            String pwdFileName = env.getSecurityPasswordsFilePath();
            File pwdFile = new File(pwdFileName);
            if(pwdFile.exists())
                return null;
            //now test the security attribute in init.conf file in "live" directory
            InitConfFileBean conf = new InitConfFileBean();
View Full Code Here

        catch (ConfigException e)
        {
            throw new ServerInstanceException(e.getMessage());
        }
        if (!applyNeeded && checkAllFiles) {
            InstanceEnvironment ie = new InstanceEnvironment(mInstanceName);
            applyNeeded = ie.hasRealmsKeyConfFileChanged();
        }
        return applyNeeded;
    }
View Full Code Here

    public boolean overwriteConfigChanges() throws ServerInstanceException
    {
         try {
             return applyChanges(true);
  } catch (AFRuntimeStoreException e) {
            InstanceEnvironment ie = new InstanceEnvironment(mInstanceName);

             if(ie.canReloadManualXmlChanges()) {
    try {
                    ie.useManualServerXmlChanges();
                    reloadAfterChange(ie);
    } catch(ConfigException ce) {
        // Sorry cant do anything.
    }
                return true;
View Full Code Here

    private boolean applyChanges(boolean force) throws ServerInstanceException
    {
        boolean requiresRestart = false;
        try
        {
            InstanceEnvironment instanceEnv = new InstanceEnvironment(mInstanceName);
            /* TOMCAT_BEGIN Ramakanth*/
            boolean hasConfChanges = false;
            boolean hasMimeChanges = false;
            hasConfChanges = instanceEnv.hasRealmsKeyConfFileChanged();
            /* TOMCAT_END Ramakanth*/

            instanceEnv.applyChangesFromBackup(force);
            // multicastEvent(CONFIG_CHANGED, null);
            /* New for 8.0 - temporary - gen server.xml b4 notif */
            /* This call most likely goes away */
            this.transform(instanceEnv);
            /* New for 8.0 - temporary - gen server.xml b4 notif */
 
View Full Code Here

        return requiresRestart;
    }

    public boolean canApplyConfigChanges() throws ConfigException {
        boolean b = false;
        InstanceEnvironment ie = new InstanceEnvironment(mInstanceName);
        if(AdminService.ENABLE_PERFORMANCE_THREAD) {
            b = (!ManualChangeManager.hasHotChanged(mInstanceName));
        } else {
            b = (!ie.hasHotChanged());
        }
        if((!b&& ie.canReloadManualXmlChanges()) {
            ie.useManualServerXmlChanges();
            reloadAfterChange(ie);
            boolean requiresRestart = ie.restartRequired();
            if (requiresRestart) {
                // The instance was not started after manual config changes, so
                // persist the restart required state.
                AdminEventCache cache =
                        AdminEventCache.getInstance(mInstanceName);
View Full Code Here

TOP

Related Classes of com.sun.enterprise.instance.InstanceEnvironment

Copyright © 2018 www.massapicom. 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.