Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.Application


        transactions.addTransactionsListener(this);
    }

    private void handleAppEnableChange(Object parent,
        String appName, boolean enabled) {
        Application application = applications.getApplication(appName);
        if (application.isLifecycleModule()) {
            return;
        }
        if (enabled) {
            if (isCurrentInstanceMatchingTarget(parent)) {
                enableApplication(appName);
View Full Code Here


            }
        }
    }

    private void handleOtherAppConfigChanges(Object parent, String appName) {
        Application application = applications.getApplication(appName);
        if (application.isLifecycleModule()) {
            return;
        }
        // reload the application for other application related
        // config changes if the application is in enabled state
        if (isCurrentInstanceMatchingTarget(parent) &&
View Full Code Here

        }
        return true;
    }

    private void enableApplication(String appName) {       
        Application app = applications.getApplication(appName);
        ApplicationRef appRef = domain.getApplicationRefInServer(server.getName(), appName);
        // if the application does not exist or application is not referenced
        // by the current server instance, do not load
        if (app == null || appRef == null) {
            return;
View Full Code Here

            throw re;
        }
    }

    private void disableApplication(String appName) {
        Application app = applications.getApplication(appName);
        ApplicationRef appRef = domain.getApplicationRefInServer(server.getName(), appName);
        // if the application does not exist or application is not referenced
        // by the current server instance, do not unload
        if (app == null || appRef == null) {
            return;
View Full Code Here

        if (applications == null)
            return apps;        // no apps

        // all apps are under <server>, even in a cluster
        for (ApplicationRef ref : server.getApplicationRef()) {
            Application app = applications.getApplication(ref.getRef());
            if (app != null) {
                logger.finest("ServerSynchronizer: got app " + app.getName());
                if (Boolean.parseBoolean(app.getDirectoryDeployed()))
                    logger.finest("ServerSynchronizer: skipping directory " +
                                "deployed app: " + app.getName());
                else
                    apps.put(VersioningUtils.getRepositoryName(app.getName()), app);
            }
        }
        return apps;
    }
View Full Code Here

        if (applications == null)
            return apps;        // no apps

        // all apps are under <server>, even in a cluster
        for (ApplicationRef ref : server.getApplicationRef()) {
            Application app = applications.getApplication(ref.getRef());
            if (app != null) {
                logger.finest("ServerSynchronizer: got app " + app.getName());
                if (Boolean.parseBoolean(app.getDirectoryDeployed()))
                    logger.finest("ServerSynchronizer: skipping directory " +
                                "deployed app: " + app.getName());
                else
                    apps.put(VersioningUtils.getRepositoryName(app.getName()), app);
            }
        }
        return apps;
    }
View Full Code Here

            NotProcessed np = null;
            if(instance instanceof Application){
                Resources resources = ((Application)instance).getResources();
                pingConnectionPool(resources);

                Application app = (Application)instance;
                List<Module> modules = app.getModule();
                if(modules != null){
                    for(Module module : modules){
                        if(module.getResources() !=null && module.getResources().getResources() != null){
                            pingConnectionPool(module.getResources());
                        }
View Full Code Here

    public void execute(AdminCommandContext context) {
        final ActionReport report = context.getActionReport();
        final Logger logger = context.getLogger();

        try {
            Application application = applications.getApplication(name);
            Transaction t = new Transaction();

            // create a dummy context to hold params and props
            DeployCommandParameters commandParams = new DeployCommandParameters();
            commandParams.name = name;
View Full Code Here

        report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
    }

    private void validateTarget(String target, String name) {
        List<String> referencedTargets = domain.getAllReferencedTargetsForApplication(name);
        Application app = apps.getApplication(name);
        if (app != null && !app.isLifecycleModule()){
             throw new IllegalArgumentException(localStrings.getLocalString("application_withsamename_exists", "Application with same name {0} already exists, please pick a different name for the lifecycle module.", name))
        }
        if (referencedTargets.isEmpty()) {
            if (deployment.isRegistered(name)) {
                throw new IllegalArgumentException(localStrings.getLocalString("lifecycle.use.create_app_ref_2", "Lifecycle module {0} is already created in this domain. Please use create application ref to create application reference on target {1}", name, target));
View Full Code Here

    private boolean isApplicationOfThisType(String name, String type) {
        if (type == null)  {
            return true;
        }

        Application app = applications.getApplication(name);
        if (app != null) {
            if (!app.isStandaloneModule()) {
                if (type.equals("ear")) {
                    return true;
                } else {
                    return false;
                }
            }
            for (Module module : app.getModule()) {
                final List<Engine> engineList = module.getEngines();
                for (Engine engine : engineList) {
                    if (engine.getSniffer().equals(type)) {
                        return true;
                    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.Application

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.