Package org.apache.geronimo.deployment.tools.loader

Examples of org.apache.geronimo.deployment.tools.loader.WebDeployable


        return applicationInfo;
    }

    public static void parseWarReferences(PortletRequest request, WARConfigData data, URL warUrl)
            throws Exception {
        WebDeployable webDeployable = new WebDeployable(warUrl);
        ClassLoader classLoader = webDeployable.getModuleLoader();

        ApplicationInfo applicationInfo = createApplicationInfo(request, warUrl);
        Module module = (Module) (applicationInfo.getModules().toArray()[0]);
        WebAppType webApp = (WebAppType) module.getSpecDD();

        ClassFinder classFinder = null;
        try {
            classFinder = AbstractWebModuleBuilder.createWebAppClassFinder(webApp, classLoader);
            // classFinder = new ClassFinder(classLoader);
        } catch (DeploymentException e1) {
            // Some of the class types referred in the WAR cannot be resolved.
            // A typical case would be references to EJBs already deployed into the system, and
            // hence not packaged inside WEB-INF/lib directory of WAR.
            // try adding all EJBs deployed in the system as parents of this WAR, and
            // see if referred classes can now be successfully resolved

            classLoader = new WebDeployable(warUrl, getEjbClassLoaders(request)).getModuleLoader();
            try {
                classFinder = AbstractWebModuleBuilder.createWebAppClassFinder(webApp, classLoader);
            } catch (DeploymentException e2) {
                return;
            }
View Full Code Here


        return elements[0] + "/" + elements[1] + "/" + elements[2] + "/" + elements[3];
    }

    public static String createDeploymentPlan(PortletRequest request, WARConfigData data, URL WarUrl)
            throws IOException, DDBeanCreateException, InvalidModuleException, ConfigurationException, DeploymentManagerCreationException {
        WebDeployable webDeployable = new WebDeployable(WarUrl);
        DDBeanRoot ddBeanRoot = webDeployable.getDDBeanRoot();
        DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];

        Kernel kernel = PortletManager.getKernel();
        DeploymentFactory factory = new DeploymentFactoryWithKernel(kernel);
        DeploymentManager deploymentManager = factory.getDeploymentManager("deployer:geronimo:inVM", null, null);
View Full Code Here

public class WebDeployableTest extends TestCase {
    private ClassLoader classLoader;

    public void testWebClasspath() throws Exception {
        URL resource = classLoader.getResource("deployables/war1.war");
        WebDeployable deployable = new WebDeployable(resource);
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        URL warDir = classLoader.getResource("deployables/war1/");
        deployable = new WebDeployable(warDir);
        config = new WARConfiguration(deployable);

        ddBeanRoot = deployable.getDDBeanRoot();
        configRoot = (WebAppDConfigRoot) config.getDConfigBeanRoot(ddBeanRoot);
    }
View Full Code Here

public class WebDeployableTest extends TestCase {
    private ClassLoader classLoader;

    public void testWebClasspath() throws Exception {
        URL resource = classLoader.getResource("deployables/war1.war");
        WebDeployable deployable = new WebDeployable(resource);
    }
View Full Code Here

        return applicationInfo;
    }

    public static void parseWarReferences(PortletRequest request, WARConfigData data, URL warUrl)
            throws Exception {
        WebDeployable webDeployable = new WebDeployable(warUrl);
        ClassLoader classLoader = webDeployable.getModuleLoader();

        ApplicationInfo applicationInfo = createApplicationInfo(request, warUrl);
        Module module = (Module) (applicationInfo.getModules().toArray()[0]);
        WebAppType webApp = (WebAppType) module.getSpecDD();

        ClassFinder classFinder = null;
        try {
            classFinder = AbstractWebModuleBuilder.createWebAppClassFinder(webApp, classLoader);
            // classFinder = new ClassFinder(classLoader);
        } catch (DeploymentException e1) {
            // Some of the class types referred in the WAR cannot be resolved.
            // A typical case would be references to EJBs already deployed into the system, and
            // hence not packaged inside WEB-INF/lib directory of WAR.
            // try adding all EJBs deployed in the system as parents of this WAR, and
            // see if referred classes can now be successfully resolved

            classLoader = new WebDeployable(warUrl, getEjbClassLoaders(request)).getModuleLoader();
            try {
                classFinder = AbstractWebModuleBuilder.createWebAppClassFinder(webApp, classLoader);
            } catch (DeploymentException e2) {
                throw e2;
            }
View Full Code Here

        return elements[0] + "/" + elements[1] + "/" + elements[2] + "/" + elements[3];
    }

    public static String createDeploymentPlan(PortletRequest request, WARConfigData data, URL WarUrl)
            throws IOException, DDBeanCreateException, InvalidModuleException, ConfigurationException, DeploymentManagerCreationException {
        WebDeployable webDeployable = new WebDeployable(WarUrl);
        DDBeanRoot ddBeanRoot = webDeployable.getDDBeanRoot();
        DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];

        Kernel kernel = PortletManager.getKernel();
        DeploymentFactory factory = new DeploymentFactoryWithKernel(kernel);
        DeploymentManager deploymentManager = factory.getDeploymentManager("deployer:geronimo:inVM", null, null);
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        URL warDir = classLoader.getResource("deployables/war1/");
        deployable = new WebDeployable(warDir);
        config = new WARConfiguration(deployable);

        ddBeanRoot = deployable.getDDBeanRoot();
        configRoot = (WebAppDConfigRoot) config.getDConfigBeanRoot(ddBeanRoot);
    }
View Full Code Here

public class WebDeployableTest extends TestCase {
    private ClassLoader classLoader;

    public void testWebClasspath() throws Exception {
        URL resource = classLoader.getResource("deployables/war1.war");
        WebDeployable deployable = new WebDeployable(resource);
    }
View Full Code Here

        return applicationInfo;
    }

    public static void parseWarReferences(PortletRequest request, WARConfigData data, URL warUrl)
            throws Exception {
        WebDeployable webDeployable = new WebDeployable(warUrl);
        ClassLoader classLoader = webDeployable.getModuleLoader();

        ApplicationInfo applicationInfo = createApplicationInfo(request, warUrl);
        Module module = (Module) (applicationInfo.getModules().toArray()[0]);
        WebAppType webApp = (WebAppType) module.getSpecDD();

        ClassFinder classFinder = null;
        try {
            classFinder = AbstractWebModuleBuilder.createWebAppClassFinder(webApp, classLoader);
            // classFinder = new ClassFinder(classLoader);
        } catch (DeploymentException e1) {
            // Some of the class types referred in the WAR cannot be resolved.
            // A typical case would be references to EJBs already deployed into the system, and
            // hence not packaged inside WEB-INF/lib directory of WAR.
            // try adding all EJBs deployed in the system as parents of this WAR, and
            // see if referred classes can now be successfully resolved

            classLoader = new WebDeployable(warUrl, getEjbClassLoaders(request)).getModuleLoader();
            try {
                classFinder = AbstractWebModuleBuilder.createWebAppClassFinder(webApp, classLoader);
            } catch (DeploymentException e2) {
                throw e2;
            }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.deployment.tools.loader.WebDeployable

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.