Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.Application$ArchiveIntrospectionFilter


     * @return List list of HashMaps
     * @throws java.lang.Exception
     */
    public static List getSipApplicationSubComponents(String appName) throws Exception {
        ObjectName sipConfigsObject = SipUtil.getSipConfigsObject();
        Application app = (Application) SipUtil.getChildByFunction(sipConfigsObject,
                "getDescrForApplication",
                new Object[]{appName}, new String[]{"java.lang.String"});
        Iterator appModules = app.getModules();
        List result = new ArrayList();
        while (appModules.hasNext()) {
            ModuleDescriptor module = (ModuleDescriptor) appModules.next();
            if (SipUtil.SIP_MODULE_TYPE.equals(module.getModuleType().toString())) {
                SipBundleDescriptor desc = (SipBundleDescriptor) module.getDescriptor();
View Full Code Here


            ExtensionModuleConfigManager manager = PluggableDeploymentInfo.getExtensionModuleDeployer(
                    j2eeModule.getModuleType()).getConfigManager();

            BundleDescriptor desc = (BundleDescriptor)manager.getRegisteredExtensionDescriptor(moduleName);
            if (desc == null) {
                Application app = manager.getExtensionDescriptor(moduleName,
                        manager.getLocation(moduleName), true);
                desc = (BundleDescriptor) app.getBundleDescriptors().iterator().next();
            }
            return desc;
        } catch (Exception e) {
            throw new ServerInstanceException(e.getLocalizedMessage());
        }
View Full Code Here

        return container_.getEjbDescriptor().getName();
    }

    String getTimedObjectApplicationName() {
        EjbDescriptor ejbDesc = container_.getEjbDescriptor();
        Application app = ejbDesc.getApplication();
        return (app != null) ? app.getRegistrationName() : "";
    }
View Full Code Here

     * @throws   ConfigException if unable to load the deployment descriptor
     */
     public Application getDescriptor(String modId, ClassLoader cl, String modDir,
        boolean validateXml) throws ConfigException {
  
        Application application = getRegisteredDescriptor(modId);
        if (application!=null) {
            application.setClassLoader(cl);
            return application;
        }            
   try {
       AppClientArchivist appClientArchivist = new AppClientArchivist();
       appClientArchivist.setXMLValidation(validateXml);
             appClientArchivist.setClassLoader(cl);
      
       FileArchive archive = openDDArchive(modId, modDir);
            
             // Try to load the app from the serialized descriptor file.
             SerializedDescriptorHelper.Loader sdLoader =
                     SerializedDescriptorHelper.load(modId, this);
             Application deserializedApplication = sdLoader.getApplication();
             if (deserializedApplication != null) {
                 application = deserializedApplication;
             } else {
                application = ApplicationArchivist.openArchive(modId, appClientArchivist, archive, true);
             }
View Full Code Here

                                                              throws Exception {

        String appName = null;
        try {

            Application app = configManager.getExtensionDescriptor(
                     em.getName(), em.getLocation(), true);
            RoleMapper.removeRoleMapper(app.getRoleMapper().getName());
            appName = app.getRegistrationName();
        } catch (Exception ce) {
            throw new Exception(ce);
        }

        String contextRoot = null;
View Full Code Here

     */   
    public boolean disableWebModule(ExtensionModule em) throws Exception {
   
        String appName = null;
        try {
            Application app = configManager.getExtensionDescriptor(
                     em.getName(), em.getLocation(), true);
            RoleMapper.removeRoleMapper(app.getRoleMapper().getName());
            appName = app.getRegistrationName();
        } catch (Exception ce) {
            throw new Exception(ce);
        }
       
        String contextRoot = null;
View Full Code Here

    public boolean loadJ2eeApplicationModule(ArchiveDescriptor descriptor)
                                                             throws Exception {
       
        com.sun.enterprise.config.serverbeans.ExtensionModule em = null;
        WebModuleConfig wmInfo = null;  
        Application appDesc = null;

        J2eeApplication j2eeAppBean = getJ2eeAppBean();
        ConfigContext eventConfigContext = j2eeAppBean.getConfigContext();
        String id = j2eeAppBean.getName();
        String location = j2eeAppBean.getLocation();
        String resourceType = j2eeAppBean.getObjectType()
       
        //TODO : Check if enabled and take action
       
        // get the application descriptor
        ApplicationRegistry registry = ApplicationRegistry.getInstance();
        ClassLoader appLoader = registry.getClassLoaderForApplication(id);
        if (appLoader != null) {
            appDesc = registry.getApplication(appLoader);
        }
        // If the Application object is null then we should not load.
        if(appDesc == null ) {
            // log message
            return false;
        }
        String j2eeApplication = appDesc.getRegistrationName();
       
        // get the Bundle Descriptor
        WebBundleDescriptor wbd = (WebBundleDescriptor)descriptor;
        String moduleName = wbd.getModuleDescriptor().getArchiveUri();
                           
View Full Code Here

     *
     * @throws   ConfigException if unable to load the deployment descriptor
     */
    public Application getDescriptor(String modId, ClassLoader cl,
        String moduleLoc, boolean validateXML) throws ConfigException {
        Application app = getDescriptor(modId, moduleLoc, validateXML);
  app.setClassLoader(cl);
  return app;
    }
View Full Code Here

     * @throws   ConfigException if unable to load the deployment descriptor
     */
    public Application getDescriptor(String modId, String modDir,
            boolean validateXml) throws ConfigException {
           
        Application application = getRegisteredDescriptor(modId);
        if (application!=null) {
            return application;
        }
        try {
      WebArchivist webArchivist = new WebArchivist();
      webArchivist.setXMLValidation(validateXml);
     
      FileArchive archive = openDDArchive(modId, modDir);
            // Try to load the app from the serialized descriptor file.
            SerializedDescriptorHelper.Loader sdLoader =
                    SerializedDescriptorHelper.load(modId, this);
            Application deserializedApplication = sdLoader.getApplication();
            /*
             * Before using the deserialized descriptor, make sure the
             * loader was able to load it and also make sure that the
             * default-web.xml file has not changed since the
             * serialized file was written out.  If the default-web-xml has
View Full Code Here

           
            wmInfo.setDescriptor(DOLLoadingContextFactory.getDefaultWebBundleDescriptor());
            WebBundleDescriptor wbd = wmInfo.getDescriptor();
            if ( wbd.getApplication() == null ) {
                Application application = new Application();
                application.setVirtual(true);
                application.setName(Constants.DEFAULT_WEB_MODULE_NAME);
                wbd.setApplication(application);
            }
        }

        return wmInfo;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.Application$ArchiveIntrospectionFilter

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.