Package org.apache.geronimo.deployment

Examples of org.apache.geronimo.deployment.Deployable


     * @param webModule module being deployed
     * @return list of the URL(s) for the TLD files in the module
     * @throws DeploymentException if module cannot be scanned
     */
    public List<URL> scanModule(WebModule webModule) throws DeploymentException {
        Deployable deployable = webModule.getDeployable();
        if (!(deployable instanceof DeployableBundle)) {
            throw new IllegalArgumentException("Expected DeployableBundle");
        }
        Bundle bundle = ((DeployableBundle) deployable).getBundle();
       
View Full Code Here


     * @param webModule module being deployed
     * @return list of the URL(s) for the TLD files in the module
     * @throws DeploymentException if module cannot be scanned
     */
    private List<URL> scanModule(WebModule webModule) throws DeploymentException {
        Deployable deployable = webModule.getDeployable();
        if (deployable instanceof DeployableJarFile) {
            JarFileTldScanner scanner = new JarFileTldScanner();
            return scanner.scanModule(webModule);
        } else if (deployable instanceof DeployableBundle) {
            BundleTldScanner scanner = new BundleTldScanner();
View Full Code Here

        AbstractName earName = null;
        String targetPath = ".";
        boolean standAlone = true;

        Deployable deployable = new DeployableBundle(bundle);
        // parse vendor dd
        TomcatWebAppType tomcatWebApp = getTomcatWebApp(null, deployable, standAlone, targetPath, webApp);

        EnvironmentType environmentType = tomcatWebApp.getEnvironment();
        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
View Full Code Here

        if (webApp == null) {
            webApp = WebAppType.Factory.newInstance();
        }

        Deployable deployable = new DeployableJarFile(moduleFile);
        // parse vendor dd
        boolean standAlone = earEnvironment == null;
        TomcatWebAppType tomcatWebApp = getTomcatWebApp(plan, deployable, standAlone, targetPath, webApp);
        contextRoot = getContextRoot(tomcatWebApp, contextRoot, webApp, standAlone, moduleFile, targetPath);
View Full Code Here

     */
    private List<Class> getFacesClasses(WebAppType webApp, WebModule webModule) throws DeploymentException {
        log.debug("getFacesClasses( " + webApp.toString() + "," + '\n' +
                           (webModule != null ? webModule.getName() : null) + " ): Entry");

        Deployable deployable = webModule.getDeployable();
        Bundle bundle = webModule.getEarContext().getDeploymentBundle();

        // 1. META-INF/faces-config.xml
        List<Class> classes = new ArrayList<Class>();
        URL url = deployable.getResource("META-INF/faces-config.xml");
        if (url != null) {
            parseConfigFile(url, bundle, classes);
        }

        // 2. WEB-INF/faces-config.xml
        url = deployable.getResource("WEB-INF/faces-config.xml");
        if (url != null) {
            parseConfigFile(url, bundle, classes);
        }

        // 3. javax.faces.CONFIG_FILES
        ParamValueType[] paramValues = webApp.getContextParamArray();
        for (ParamValueType paramValue : paramValues) {
            if (paramValue.getParamName().getStringValue().trim().equals("javax.faces.CONFIG_FILES")) {
                String configFiles = paramValue.getParamValue().getStringValue().trim();
                StringTokenizer st = new StringTokenizer(configFiles, ",", false);
                while (st.hasMoreTokens()) {
                    String configfile = st.nextToken().trim();
                    if (!configfile.equals("")) {
                        if (configfile.startsWith("/")) {
                            configfile = configfile.substring(1);
                        }
                        url = deployable.getResource(configfile);
                        if (url == null) {
                            throw new DeploymentException("Could not locate config file " + configfile);
                        } else {
                            parseConfigFile(url, bundle, classes);
                        }
View Full Code Here

                                Map servletLocations,
                                Environment environment,
                                Map sharedContext) throws DeploymentException {
        Map portMap = null;
        String path = isEJB ? "META-INF/webservices.xml" : "WEB-INF/webservices.xml";
        Deployable deployable = module.getDeployable();
        URL wsDDUrl = deployable.getResource(path);
        if (wsDDUrl != null) {
            InputStream in;
            try {
                in = wsDDUrl.openStream();
            } catch (IOException e) {
View Full Code Here

     */
    static List<Class> discoverWebServices(Module module,
                                           Bundle bundle,
                                           boolean isEJB)
            throws DeploymentException {
        Deployable deployable = module.getDeployable();
        if (deployable instanceof DeployableJarFile) {
            return discoverWebServices( ((DeployableJarFile) deployable).getJarFile(), isEJB, new BundleClassLoader(bundle));
        } else if (deployable instanceof DeployableBundle) {
            return discoverWebServices( ((DeployableBundle) deployable).getBundle(), isEJB);
        } else {
            throw new DeploymentException("Unsupported deployable: " + deployable.getClass());
        }
    }
View Full Code Here

            boolean standAlone = earEnvironment == null;

           if (parentModule instanceof WebModule)  {

               Deployable deployable = parentModule.getDeployable();
               if (!(deployable instanceof DeployableJarFile)) {
                   throw new IllegalArgumentException("Expected DeployableJarFile");
               }

                JarFile war = ((DeployableJarFile) deployable).getJarFile();
View Full Code Here

TOP

Related Classes of org.apache.geronimo.deployment.Deployable

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.