Package com.sun.enterprise.config.serverbeans

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


            peerConfig.setMsgBufferSize("4096");
            peerConfig.setEnableMsgPersistence("false");

            DiameterApplications diaApps = new DiameterApplications();
            diaApps.setId("one");
            Application diaApp = new Application();
            Authapp authApp = new Authapp();
            authApp.setId("16777221");
            diaApp.addAuthapp(authApp);
            diaApp.setVendorid("10415");
            diaApps.addApplication(diaApp);
            peerConfig.addDiameterApplications(diaApps);
        } catch (ConfigException e) {
            throw new MBeanException(e);
        }
View Full Code Here


            if (diaApps == null) {
                diaApps = new DiameterApplications();
                diaApps.setId(applicationsId);
                peerConfig.addDiameterApplications(diaApps);
            }
            Application diaApp = new Application();
            diaApp.setVendorid(vendorId);
            if (acctAppId != null) {
                Acctapp acctApp = new Acctapp();
                acctApp.setId(acctAppId);
                diaApp.addAcctapp(acctApp);
            }
            if (authAppId != null) {
                Authapp authApp = new Authapp();
                authApp.setId(authAppId);
                diaApp.addAuthapp(authApp);
            }
            diaApps.addApplication(diaApp);
        } catch (ConfigException e) {
            throw new MBeanException(e);
        }
View Full Code Here

            DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
            if (diaApps == null) {
                String msg = _strMgr.getString("ApplicationsNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            Application diaApp = diaApps.getApplicationByVendorid(vendorId);
            if (diaApp == null) {
                String msg = _strMgr.getString("ApplicationNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            if (authAppId != null) {
                Authapp authApp = new Authapp();
                authApp.setId(authAppId);
                diaApp.addAuthapp(authApp);
            }
        } catch (ConfigException e) {
            throw new MBeanException(e);
        }
    }
View Full Code Here

            DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
            if (diaApps == null) {
                String msg = _strMgr.getString("ApplicationsNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            Application diaApp = diaApps.getApplicationByVendorid(vendorId);
            if (diaApp == null) {
                String msg = _strMgr.getString("ApplicationNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            if (diaApp.getAuthappById(authAppId) != null) {
                Authapp authApp = diaApp.getAuthappById(authAppId);
                diaApp.removeAuthapp(authApp);
            }
        } catch (MBeanException e) {
            throw new MBeanException(e);
        }
    }
View Full Code Here

            DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
            if (diaApps == null) {
                String msg = _strMgr.getString("ApplicationsNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            Application diaApp = diaApps.getApplicationByVendorid(vendorId);
            if (diaApp == null) {
                String msg = _strMgr.getString("ApplicationNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            if (acctAppId != null) {
                Acctapp acctApp = new Acctapp();
                acctApp.setId(acctAppId);
                diaApp.addAcctapp(acctApp);
            }
        } catch (ConfigException e) {
            throw new MBeanException(e);
        }
    }
View Full Code Here

            DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
            if (diaApps == null) {
                String msg = _strMgr.getString("ApplicationsNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            Application diaApp = diaApps.getApplicationByVendorid(vendorId);
            if (diaApp == null) {
                String msg = _strMgr.getString("ApplicationNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            if (diaApp.getAcctappById(acctAppId) != null) {
                Acctapp acctApp = diaApp.getAcctappById(acctAppId);
                diaApp.removeAcctapp(acctApp);
            }
        } catch (MBeanException e) {
            throw new MBeanException(e);
        }
    }
View Full Code Here

        Application[] apps = diaApps.getApplication();
        if (apps.length == 1) {
            String msg = _strMgr.getString("ApplicationRequiredAtleastOne");
            throw new MBeanException(new ConfigException(msg));
        }
        Application diaApp = diaApps.getApplicationByVendorid(vendorId);
        if (diaApp != null)
            diaApps.removeApplication(diaApp);
        else {
            String msg = _strMgr.getString("ApplicationNotAvl");
            throw new MBeanException(new ConfigException(msg));
View Full Code Here

    @Override
    public void execute(AdminCommandContext context) {
        final ActionReport report = context.getActionReport();
       
        final Application app = apps.getApplication(appname);
        if (app != null) {
            Module appClient = app.getModule(modulename);
            if (appClient == null) {
                appClient = app.getModule(modulename + ".jar");
            }
            if (appClient != null) {
                String result = appClient.getPropertyValue("jws.user.friendly.path");
                /*
                 * For stand-alone app clients the property is stored at the
                 * application level instead of the module level.
                 */
                if (result == null) {
                    result = app.getPropertyValue("jws.user.friendly.path");
                }
                if (result != null) {
                    report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
                    report.getTopMessagePart().addProperty(URI_PROPERTY_NAME, result);
                    report.setMessage(result);
View Full Code Here

        }
    }

    private boolean isApplicationEnabled(String appId) {
        if (appId != null) {
            Application app = applications.getApplication(appId);
            if (app != null)
                return deployment.isAppEnabled(app);
        }
        return false;
    }
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

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.