Package com.sun.enterprise.admin.common.exception

Examples of com.sun.enterprise.admin.common.exception.AFException


        if ((appType != DeploymentConstants.EAR) &&
            (appType != DeploymentConstants.EJB) &&
            (appType != DeploymentConstants.WAR))
        {
      String msg = localStrings.getString( "admin.server.core.mbean.config.expected_application_type" );
            throw new AFException( msg );
        }
        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;
            switch (appType)
            {
                case DeploymentConstants.EAR :
                    AppsManager appsManager = new AppsManager(iEnv);
                    appLocation = appsManager.getGeneratedXMLLocation(appName);
                    if (appLocation == null || !FileUtils.safeIsDirectory(appLocation)) {
                        J2eeApplication app = applicationsConfigBean.
                                            getJ2eeApplicationByName(appName);
                        appLocation = app.getLocation();
                    }
                    break;
                case DeploymentConstants.EJB :
                    EjbModulesManager ejbManager = new EjbModulesManager(iEnv);
                    appLocation = ejbManager.getGeneratedXMLLocation(appName);
                    if (appLocation == null || !FileUtils.safeIsDirectory(appLocation)) {
                        EjbModule module = applicationsConfigBean.
                                            getEjbModuleByName(appName);
                        appLocation = module.getLocation();
                    }
                    break;
                case DeploymentConstants.WAR:
                    WebModulesManager webManager = new WebModulesManager(iEnv);
                    appLocation = webManager.getGeneratedXMLLocation(appName);
                    if (appLocation == null || !FileUtils.safeIsDirectory(appLocation)) {
                        WebModule webModule = applicationsConfigBean.
                                            getWebModuleByName(appName);
                        appLocation = webModule.getLocation();
                    }
                    break;
            }
           
            FileArchive appArchive = new FileArchive();
            appArchive.open(appLocation);
            if (moduleName!=null) {
                moduleArchive = appArchive.getEmbeddedArchive(moduleName);           
            } else {
                moduleArchive = appArchive;
            }
            wsdlFileLocation = moduleArchive.getArchiveUri() + java.io.File.separator +
                                wsdlFileUri.replace('/', java.io.File.separatorChar);
        }
        catch (Exception e)
        {
            throw new AFException(e.getLocalizedMessage());
        }
        return wsdlFileLocation;
    }   
View Full Code Here


            }
        }
        catch (Exception e)
        {
            sLogger.log(Level.WARNING, "mbean.list_failed", e);
            throw new AFException(e.getLocalizedMessage());
        }
        return sa;
    }
View Full Code Here

            }
        }
        catch (Exception e)
        {
            sLogger.log(Level.WARNING, "mbean.list_failed", e);
            throw new AFException(e.getLocalizedMessage());
        }
        return sa;
    }
View Full Code Here

            }
        }
        catch (Exception e)
        {
            sLogger.log(Level.WARNING, "mbean.list_failed", e);
            throw new AFException(e.getLocalizedMessage());
        }
        return sa;
    }   
View Full Code Here

        }
        catch (Exception e)
        {
            sLogger.log(Level.WARNING, "mbean.list_jms_resources_failed", e);
            throw new AFException(e.getLocalizedMessage());
        }
        sa = new String[v.size()];
        for (int k = 0; k < sa.length; k++)
                sa[k] = (String) v.elementAt(k);
        return sa;
View Full Code Here

        try{
            return DeploymentClientUtils.downloadClientStubs(
                        appName, destDir, dasConnection);
        }catch(Exception e){
            e.printStackTrace();
            throw new AFException(e.getMessage());
        }
    }
View Full Code Here

            }
        }
        catch (Exception e)
        {
            sLogger.throwing(getClass().getName(), "getStatus", e);
            throw new AFException(e.getMessage());
        }
        return status;
    }
View Full Code Here

        try {
            String moduleName = (String)this.getAttribute(kName);
            multicastAdminEvent(moduleName, BaseDeployEvent.DISABLE);
        } catch (Exception e) {
            sLogger.throwing(getClass().getName(), "stop", e);
            throw new AFException(e.getMessage());
        }
    }
View Full Code Here

    "J2EEServer=" + serverContext.getInstanceName());
            Integer intObj = (Integer) mbs.getAttribute(objName, "state");
      return intObj;
        } catch (Exception e) {
            sLogger.throwing(getClass().getName(), "stop", e);
            throw new AFException(e.getMessage());
        }
    }
View Full Code Here

        try {
            String moduleName = (String)this.getAttribute(kName);
            multicastAdminEvent(moduleName, BaseDeployEvent.ENABLE);
        } catch (Exception e) {
            sLogger.throwing(getClass().getName(), "start", e);
            throw new AFException(e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.common.exception.AFException

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.