Package com.sun.enterprise.config

Examples of com.sun.enterprise.config.ConfigBean


        ((Applications)configBean).removeExtensionModule(
            backEm);
    }
   
    protected boolean isRegistered(String appId, ConfigBean bean) {
        ConfigBean cb = null;
        try {
            cb = ((Applications)bean).getExtensionModuleByName(
                appId);
        } catch(Exception cn) {
        }
View Full Code Here


                        _logger.log(Level.SEVERE, "vs.defaultWebModuleDisabled",
                                    params);
                    }
                }
            } else {
                ConfigBean wm = wmInfo.getBean();
                if(wm instanceof WebModule) {
                    contextRoot = ((WebModule)wm).getContextRoot();
                } else {
                    ExtensionModule emBean = (ExtensionModule)wm;
                    contextRoot =
View Full Code Here

        boolean webModuleAvailability = false;
        J2eeApplication j2eeApp = ctx.getApplicationBean();
        if (j2eeApp == null) {
            // the stand-alone web module case
            ConfigBean bean = ctx.getBean();
            if (bean instanceof com.sun.enterprise.config.serverbeans.WebModule) {
                webModuleAvailability = ((com.sun.enterprise.config.serverbeans.WebModule) bean).isAvailabilityEnabled();
            } else {
                webModuleAvailability = ((com.sun.enterprise.config.serverbeans.ExtensionModule) bean).isAvailabilityEnabled();
            }
View Full Code Here

      ServerContext serverCtx = ApplicationServer.getServerContext();
      //this condition occurs during some unit tests
      if(serverCtx == null)
          return defaultValue;
      ConfigContext configCtx = serverCtx.getConfigContext();   
      ConfigBean configBean = null;
      String returnValueString = null;

      String returnValue = defaultValue;
      try {
          configBean =
              configCtx.exactLookup(xpath);
      } catch (ConfigException ex) {
      }     
      if(configBean != null) {
          returnValueString = configBean.getAttributeValue("value");
      }
      if(returnValueString != null) {
          returnValue = returnValueString;
      }
      if(_logger.isLoggable(Level.FINEST)) {
View Full Code Here

            _logger.finest("in getServerConfigValue:xpath=" + xpath
                + " defaultValue= " + defaultValue);
        }

        ConfigContext configCtx = this.getConfigContext();
        ConfigBean configBean = null;
        String returnValueString = null;

        int returnValue = defaultValue;
        try {
            configBean =
                configCtx.exactLookup(xpath);
        } catch (ConfigException ex) {
        }     
        if(configBean != null) {
            returnValueString = configBean.getAttributeValue("value");
        }
        if(returnValueString != null) {
            try {
                returnValue = (Integer.valueOf(returnValueString)).intValue();
            } catch (NumberFormatException ex) {
View Full Code Here

        String origContextRoot = null;
        if (isModuleDeployed(name)) {
            // preserve the context root information for war redeployment
            try {
                ConfigContext confContext = getConfigContext();
                ConfigBean configBean =  ApplicationHelper.findApplication(
                    confContext, name);
                if (configBean instanceof WebModule) {
                    origContextRoot = ((WebModule)configBean).getContextRoot();
                }
            } catch (ConfigException ce) {
View Full Code Here

    private void loadJdbcResource(PersistenceManagerFactoryResource cr)
                        throws Exception {

        String resName = cr.getJdbcResourceJndiName();
        Resources resources = (Resources) cr.parent();
        ConfigBean cb = resources.getJdbcResourceByJndiName(resName);
        if (cb != null) {
            try {
                InitialContext ic = new InitialContext();
                ic.lookup(resName);
            } catch (Exception e) {
View Full Code Here

            return false;
        }
    }
   
    protected boolean isRegistered(String appId, ConfigBean bean) {
        ConfigBean cb = null;
        try {
            cb = ((Applications)bean).getJ2eeApplicationByName(appId);
        } catch(Exception cn) {
        }
       
View Full Code Here

     * @param moduleName The name of the component (application or module)
     * @return boolean
     */
    protected boolean isEnabled (ConfigContext config, String moduleName) {
        try {
            ConfigBean app = ApplicationHelper.findApplication(config, moduleName);

            Server server = ServerBeansFactory.getServerBean(config);
            ApplicationRef appRef = server.getApplicationRefByRef(moduleName);
            return ((app != null && app.isEnabled()) &&
                        (appRef != null && appRef.isEnabled()));
        } catch (ConfigException e) {
            AdminEventListenerException ex = new AdminEventListenerException();
            ex.initCause(e);
            _logger.log(Level.FINE, "Error in finding " + moduleName, e);
View Full Code Here

     * @throws ConfigException if data in trancient property has wrong type
     * @returns String array of context roots, or null - if inapropriate bean type
     */
     public static String[] getAppContextRoots(ConfigContext ctx, String appName) throws ConfigException, IASDeploymentException
    {
        ConfigBean appBean = ApplicationHelper.findApplication(ctx, appName);
        if(appBean==null)
        {
            throw new ConfigException(_strMgr.getString("applicationElementIsNotFoundForName", appName));
        }
        return getAppContextRoots(appBean);
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.ConfigBean

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.