Package org.apache.geronimo.xbeans.geronimo.j2ee

Examples of org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType


        for (int i = getEnterpriseApp().getModuleArray().length - 1; i >= 0; i--) {
            getEnterpriseApp().removeModule(i);
        }
        for (Enumeration<String> e = webModules.keys(); e.hasMoreElements();) {
            String moduleName = e.nextElement();
            GerModuleType newModule = getEnterpriseApp().addNewModule();
            newModule.addNewWeb().setStringValue(moduleName);

            WARConfigData warConfig = webModules.get(moduleName);

            warConfig.getJndiRefsConfig().storeResourceRefs(warConfig.getWebApp());
            if (warConfig.getSecurity() != null) {
                warConfig.getWebApp().setSecurity(warConfig.getSecurity());
            }
           
            GerWebAppDocument webAppDocument = GerWebAppDocument.Factory.newInstance();
            webAppDocument.setWebApp(warConfig.getWebApp());

            // See http://xmlbeans.apache.org/docs/2.0.0/guide/conHandlingAny.html
            XmlCursor xsAnyCursor = webAppDocument.newCursor();
            xsAnyCursor.toNextToken();
            XmlCursor rootCursor = newModule.newCursor();
            rootCursor.toEndToken();
            xsAnyCursor.moveXml(rootCursor);
            xsAnyCursor.dispose();
            rootCursor.dispose();
        }
        for (Enumeration<String> e = ejbModules.keys(); e.hasMoreElements();) {
            String moduleName = e.nextElement();
            GerModuleType newModule = getEnterpriseApp().addNewModule();
            newModule.addNewEjb().setStringValue(moduleName);
            EjbConfigData ejbConfig = ejbModules.get(moduleName);
        }

        GerApplicationDocument appDocument = GerApplicationDocument.Factory.newInstance();
        appDocument.setApplication(enterpriseApp);
View Full Code Here


    private void addModules(JarFile earFile, ApplicationType application, GerApplicationType gerApplication, Set moduleLocations, Set modules) throws DeploymentException {
        Map altVendorDDs = new HashMap();
        try {
            // build map from module path to alt vendor dd
            GerModuleType gerModuleTypes[] = gerApplication.getModuleArray();
            for (int i = 0; i < gerModuleTypes.length; i++) {
                GerModuleType gerModule = gerModuleTypes[i];
                String path = null;
                if (gerModule.isSetEjb()) {
                    path = gerModule.getEjb().getStringValue();
                } else if (gerModule.isSetWeb()) {
                    path = gerModule.getWeb().getStringValue();
                } else if (gerModule.isSetConnector()) {
                    path = gerModule.getConnector().getStringValue();
                } else if (gerModule.isSetJava()) {
                    path = gerModule.getJava().getStringValue();
                }

                if (gerModule.isSetAltDd()) {
                    // the the url of the alt dd
                    try {
                        altVendorDDs.put(path, DeploymentUtil.toTempFile(earFile, gerModule.getAltDd().getStringValue()));
                    } catch (IOException e) {
                        throw new DeploymentException("Invalid alt vendor dd url: " + gerModule.getAltDd().getStringValue(), e);
                    }
                } else {
                    //dd is included explicitly
                    XmlCursor cursor = gerModule.newCursor();
                    try {
                        cursor.toFirstChild();
                        cursor.toNextSibling();
                        //should be at the "any" element
                        XmlObject any = cursor.getObject();
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType

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.