Package javax.enterprise.deploy.shared.factories

Examples of javax.enterprise.deploy.shared.factories.DeploymentFactoryManager


    public static String[] deploy(PortletRequest actionRequest, File moduleFile, File planFile)
            throws PortletException {
        // TODO this is a duplicate of the code from
        // org.apache.geronimo.console.configmanager.DeploymentPortlet.processAction()
        // TODO need to eliminate this duplicate code
        DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
        String[] statusMsgs = new String[2];
        try {
            DeploymentManager mgr = dfm.getDeploymentManager("deployer:geronimo:inVM", null, null);
            try {
                if (mgr instanceof JMXDeploymentManager) {
                    ((JMXDeploymentManager) mgr).setLogConfiguration(false, true);
                }
View Full Code Here


                }
            }
        } catch (FileUploadException e) {
            throw new PortletException(e);
        }
        DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
        FileInputStream fis = null;
        try {
            DeploymentManager mgr = dfm.getDeploymentManager("deployer:geronimo:inVM", null, null);
            try {
                boolean isRedeploy = redeploy != null && !redeploy.equals("");
                if(mgr instanceof JMXDeploymentManager) {
                    ((JMXDeploymentManager)mgr).setLogConfiguration(false, true);
                }
View Full Code Here

     * @throws DeploymentManagerCreationException
     */
    protected DeploymentManager getDeploymentManager() throws IOException, DeploymentManagerCreationException {
        if (deploymentManager == null) {
            // Register the Geronimo factory
            DeploymentFactoryManager manager = DeploymentFactoryManager.getInstance();
            manager.registerDeploymentFactory(new DeploymentFactoryImpl());

            String uri = URI_PREFIX + "://" + hostname + ":" + port;

            DeploymentFactoryManager factoryManager = DeploymentFactoryManager.getInstance();
            deploymentManager = factoryManager.getDeploymentManager(uri, username, password);
        }

        return deploymentManager;
    }
View Full Code Here

        }
       
    }

    private void tryToConnect(String uri, String driver, String host, Integer port, String user, String password, boolean secure) throws DeploymentException {
        DeploymentFactoryManager mgr = DeploymentFactoryManager.getInstance();
        if (driver != null) {
            loadDriver(driver, mgr);
        }
       
        if (host != null || port != null || uri == null) {
            uri = DeployUtils.getConnectionURI(host, port, secure);
        }
       
        if (user == null && password == null) {
            try {
                SavedAuthentication savedAuthentication = DeployUtils.readSavedCredentials(uri);
                if (savedAuthentication != null) {
                    user = savedAuthentication.getUser();
                    password = new String(savedAuthentication.getPassword());
                }
            } catch (IOException e) {
                System.out.println("Warning: " + e.getMessage());
            }
        }
        if (secure) {
            DeployUtils.setSecurityProperties();
        }
        if (user == null || password == null) {
            try {
                if (user == null) {
                    user = handler.getUsername();
                }
                if (password == null) {
                    password = handler.getPassword();
                }
            } catch (IOException e) {
                throw new DeploymentException("Unable to prompt for login", e);
            }
        }
        try {
            manager = mgr.getDeploymentManager(uri, user, password);
            auth = new SavedAuthentication(uri, user, password == null ? null : password.toCharArray());
        } catch (AuthenticationFailedException e) {
            // server's there, you just can't talk to it
            throw new DeploymentException("Login Failed");
        } catch (DeploymentManagerCreationException e) {
View Full Code Here

    public static ApplicationInfo createApplicationInfo(PortletRequest actionRequest, File moduleFile) {
        ApplicationInfo applicationInfo = null;
        EARConfigBuilder.createPlanMode.set(Boolean.TRUE);
        try {
            DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
            DeploymentManager mgr = dfm.getDeploymentManager("deployer:geronimo:inVM", null, null);
            if (mgr instanceof JMXDeploymentManager) {
                ((JMXDeploymentManager) mgr).setLogConfiguration(false, true);
            }
            Target[] targets = mgr.getTargets();
            if (null == targets) {
View Full Code Here

    public static String[] deploy(PortletRequest actionRequest, File moduleFile, File planFile)
            throws PortletException {
        // TODO this is a duplicate of the code from
        // org.apache.geronimo.console.configmanager.DeploymentPortlet.processAction()
        // TODO need to eliminate this duplicate code
        DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
        String[] statusMsgs = new String[2];
        try {
            DeploymentManager mgr = dfm.getDeploymentManager("deployer:geronimo:inVM", null, null);
            try {
                if (mgr instanceof JMXDeploymentManager) {
                    ((JMXDeploymentManager) mgr).setLogConfiguration(false, true);
                }
View Full Code Here

                }
            }
        } catch (FileUploadException e) {
            throw new PortletException(e);
        }
        DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
        FileInputStream fis = null;
        try {
            DeploymentManager mgr = dfm.getDeploymentManager("deployer:geronimo:inVM", null, null);
            try {
                boolean isRedeploy = redeploy != null && !redeploy.equals("");
                if(mgr instanceof JMXDeploymentManager) {
                    ((JMXDeploymentManager)mgr).setLogConfiguration(false, true);
                }
View Full Code Here

    public static String[] deploy(PortletRequest actionRequest, File moduleFile, File planFile)
            throws PortletException {
        // TODO this is a duplicate of the code from
        // org.apache.geronimo.console.configmanager.DeploymentPortlet.processAction()
        // TODO need to eliminate this duplicate code
        DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
        String[] statusMsgs = new String[2];
        try {
            DeploymentManager mgr = dfm.getDeploymentManager("deployer:geronimo:inVM", null, null);
            try {
                if (mgr instanceof JMXDeploymentManager) {
                    ((JMXDeploymentManager) mgr).setLogConfiguration(false, true);
                }
               
View Full Code Here

     * @throws DeploymentManagerCreationException
     */
    protected DeploymentManager getDeploymentManager() throws IOException, DeploymentManagerCreationException {
        if (deploymentManager == null) {
            // Register the Geronimo factory
            DeploymentFactoryManager manager = DeploymentFactoryManager.getInstance();
            manager.registerDeploymentFactory(new DeploymentFactoryImpl());

            String uri = URI_PREFIX + "://" + hostname + ":" + port;

            DeploymentFactoryManager factoryManager = DeploymentFactoryManager.getInstance();
            deploymentManager = factoryManager.getDeploymentManager(uri, username, password);
        }

        return deploymentManager;
    }
View Full Code Here

    /**
     * Test init.
     */
    public void testInit() {
       
        DeploymentFactoryManager deploymentFactoryManager
                = DeploymentFactoryManager.getInstance();
       
        DeploymentFactory deploymentFactory = new MyDeploymentFactory();
        deploymentManager = new MyDeploymentManager();
       
View Full Code Here

TOP

Related Classes of javax.enterprise.deploy.shared.factories.DeploymentFactoryManager

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.