Examples of IDeployerManager


Examples of org.ow2.util.ee.deploy.api.deployer.IDeployerManager

        // Add the configuration URL to the existing list
        this.embedded = new Embedded();
        this.embedded.getServerConfig().getConfigurationURLs().add(xmlConfigurationURL);

        // Use JOnAS deployer
        IDeployerManager deployerManager = new DeployerManager();
        this.embedded.setDeployerManager(deployerManager);
        try {
            JOnASDeployer deployer = new JOnASDeployer();
            deployer.setEmbedded(this.embedded);
            deployerManager.register(deployer);
        } catch (DeployerException e) {
            throw new ResourceAdapterInternalException("Cannot register the JOnAS deployer", e);
        }

View Full Code Here

Examples of org.ow2.util.ee.deploy.api.deployer.IDeployerManager

    public void start() {
        logger.info("Configuring EasyBeans for Web Container type ''{0}''", this.containerType);

        // Create embedded instance
        this.embedded = new Embedded();
        IDeployerManager deployerManager = new DeployerManager();
        this.embedded.setDeployerManager(deployerManager);

        AbsDeployer deployer = null;

        // Register the deployers
        switch (this.containerType) {
        // Use Tomcat deployer if it is Tomcat
        case TOMCAT6:
            try {
                deployer = new Tomcat6Deployer();
            } catch (DeployerException e) {
                logger.warn("Unable to set Tomcat6 deployer.", e);
            }
            break;
        case JETTY6:
            try {
                JettyDeployer.setContextEvent(this.servletContextEvent);
                deployer = new JettyDeployer();
            } catch (DeployerException e) {
                logger.warn("Unable to set the servlet context event on the jetty deployer."
                        + "The default deployer will be used.", e);
            }
            break;
        case JETTY7:
            try {
                deployer = new Jetty7Deployer(this.servletContextEvent);
            } catch (DeployerException e) {
                logger.warn("Unable to set the servlet context event on the jetty deployer."
                        + "The default deployer will be used.", e);
            }
            break;
        case UNKNOWN:
        default:
            logger.info("Using default deployer as the web container has not be detected");
        deployer = new EasyBeansDeployer();
            break;

        }
        // reset the deployer
        deployer.setEmbedded(this.embedded);
        deployerManager.register(deployer);

        // user configuration ?
        URL xmlConfigurationURL = Thread.currentThread().getContextClassLoader().getResource(EasyBeans.USER_XML_FILE);

        if (xmlConfigurationURL == null) {
View Full Code Here

Examples of org.ow2.util.ee.deploy.api.deployer.IDeployerManager

     * Deploy an EJB or an EAR.
     * If deployable file is already deployed, redeploy the file.
     * @param filename A deployable
     */
    public void deployArchive(final String filename) {
        IDeployerManager deployer = this.server.getDeployerManager();
        if (deployer != null) {
            File file = new File(filename);
            try {
                IArchive archive = removeArchiveIfDeployed(file);

                if (archive != null) {
                    IDeployable deployable = DeployableHelper.getDeployable(archive);
                    if (deployable instanceof EJBDeployable || deployable instanceof EARDeployable) {
                        deployer.deploy(deployable);
                    } else {
                        logger.warn("Archive \"" + file.getName() + "\" not available.");
                    }
                }
            } catch (DeployerException ex) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.