Package com.sun.enterprise.config.serverbeans

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


     */
    public static ConnectorModule[] getAssociatedConnectorModules(
            ConfigContext ctx, String clusterName) throws ConfigException {

        ArrayList list = new ArrayList();
        Domain domain = (Domain) ctx.getRootConfigBean();
        Applications applications = domain.getApplications();

        Cluster cluster = domain.getClusters().getClusterByName(clusterName);
        if (cluster != null) {
            ConnectorModule[] connMods = applications.getConnectorModule();
            for (int i=0; i < connMods.length; i++) {
                if (clusterReferencesApplication(ctx, clusterName,
                                                connMods[i].getName()) ) {
View Full Code Here


   
    protected LbConfigs getLbConfigs() {
        try {
            ConfigContext ctx = AdminService.getAdminService().getAdminContext()
                                    .getAdminConfigContext();
            Domain domain = (Domain)ctx.getRootConfigBean();
            LbConfigs cfgs = domain.getLbConfigs();
            if (cfgs == null) {
                cfgs = new LbConfigs();
                domain.setLbConfigs(cfgs);
            }
            return cfgs;
        } catch( ConfigException ce) {
            return null;
        }
View Full Code Here

        throws MBeanException {
        _logger.log(Level.FINE, "[LBAdminMBean] listLBConfigs called" );
        try{
        ConfigContext ctx = AdminService.getAdminService().getAdminContext()
                                                    .getAdminConfigContext();
        Domain domain = (Domain)ctx.getRootConfigBean();
        LoadBalancers loadbalancers = ((Domain)ctx.getRootConfigBean())
                                                    .getLoadBalancers();
        if (loadbalancers == null ) {
            _logger.log(Level.INFO, _sMgr.getString(
                    "http_lb_admin.NoLbConfigs"));
View Full Code Here

            ePoints = ath.getEndPoints();

        } else // domain destination

            //throw new UnsupportedOperationException();
            Domain domain = ConfigAPIHelper.getDomainConfigBean(ctx);
            Server[] servers=domain.getServers().getServer();
            ePoints = TargetHelperBase.createEndPoints(servers, ctx);
        }

        return ePoints;
    }
View Full Code Here

     * be referenced by (i.e. deployed to) the newly created server.
     */
    protected void addSystemApplications(Object clusterOrServer) throws ConfigException
    {       
        final ConfigContext configContext = getConfigContext();
        final Domain domain = ConfigAPIHelper.getDomainConfigBean(
            configContext);
        final Applications applications = domain.getApplications();
        ConnectorModule[] connectors = applications.getConnectorModule();       
        for (int i = 0; i < connectors.length; i++) {
            if (isSystemApp(connectors[i].getObjectType())) {
                addApplicationReference(clusterOrServer, connectors[i].isEnabled(),
                    connectors[i].getName());
View Full Code Here

       
    protected void addSystemResources(
        Object clusterOrServer) throws ConfigException
    {
        final ConfigContext configContext = getConfigContext();
        final Domain domain = ConfigAPIHelper.getDomainConfigBean(
            configContext);
        final Resources resources = domain.getResources();      
        ConnectorResource[] crs = resources.getConnectorResource();
        for (int i = 0; i < crs.length; i++) {
            if (isSystemApp(crs[i].getObjectType())) {
                addResourceReference(clusterOrServer, crs[i].isEnabled(),
                    crs[i].getJndiName());
View Full Code Here

                if (!NodeAgentRegistry.isMBeanServerUnreachable(ex)) {
                    throw new AgentException(ex);
                }
            }

            Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);
            NodeAgents controllers = domain.getNodeAgents();
            controllers.removeNodeAgent(controller, OVERWRITE);

            //Notify the Node Agent to rendezvous
            //FIXTHIS: We force persistence, clear any notifications, and update the
            //Application server's config context explicitely. Until this is modelled
View Full Code Here

                    nodeAgentName));
            }

            //Get the node controller specified by nodeAgentName and ensure that it does not
            //already exist
            Domain domain = ServerBeansFactory.getDomainBean(configContext);
            NodeAgents controllers =domain.getNodeAgents();
            NodeAgent controller = controllers.getNodeAgentByName(nodeAgentName);
            if (controller != null) {
                throw new AgentException(_strMgr.getString("agentAlreadyExists", nodeAgentName));
            }
View Full Code Here

        try {
            final ConfigContext configContext = getConfigContext();

            //Get the node controller specified by nodeAgentName and ensure that it does not
            //already exist
            Domain domain = ServerBeansFactory.getDomainBean(configContext);
            NodeAgents controllers =domain.getNodeAgents();
            NodeAgent controller = controllers.getNodeAgentByName(nodeAgentName);

            if (controller != null) {
               ElementProperty rendezvousProperty = controller.getElementPropertyByName(RENDEZVOUS_PROPERTY_NAME);
               String rendezvous=rendezvousProperty.getValue();
View Full Code Here

            final Target target = TargetBuilder.INSTANCE.createTarget(
                VALID_TYPES, serverName, configContext);  
            final NodeAgent controller = target.getNodeAgents()[0];
           
            //Remove the server instance
            final Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);           
            final Servers servers = domain.getServers();
            final Server server = target.getServers()[0];
            boolean isReachable = true;

            try {               
                ServerRuntimeMBean serverMBean = InstanceProxy.getInstanceProxy(serverName);
View Full Code Here

TOP

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

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.