Examples of DeploymentManagerCreationException


Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

            if (params.getProtocol().equals("jmx")) {
                return newRemoteDeploymentManager(username, password, params);
            } else if(params.getProtocol().equals("inVM")) {
                return new LocalDeploymentManager(KernelRegistry.getKernel(params.getHost()));
            } else {
                throw new DeploymentManagerCreationException("Invalid URI: " + uri);
            }
        } catch (RuntimeException e) {
            // some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
            log.error(e.getMessage(), e);
            throw e;
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

            if(!manager.isSameMachine()) {
                manager.setAuthentication(username, password);
            }
            return manager;
        } catch (IOException e) {
            throw (DeploymentManagerCreationException)new DeploymentManagerCreationException(e.getMessage()).initCause(e);
        } catch (SecurityException e) {
            throw (AuthenticationFailedException) new AuthenticationFailedException("Invalid login.").initCause(e);
        }
    }
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

            if (params.getProtocol().equals("jmx") || params.getProtocol().equals("jmxs")) {
                return newRemoteDeploymentManager(username, password, params);
            } else if(params.getProtocol().equals("inVM")) {
                return new LocalDeploymentManager(KernelRegistry.getKernel(params.getHost()));
            } else {
                throw new DeploymentManagerCreationException("Invalid URI: " + uri);
            }
        } catch (RuntimeException e) {
            // some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
            log.error(e.getMessage(), e);
            throw e;
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

            if(!manager.isSameMachine()) {
                manager.setAuthentication(username, password);
            }
            return manager;
        } catch (IOException e) {
            DeploymentManagerCreationException deploymentManagerCreationException =
                    (DeploymentManagerCreationException) new DeploymentManagerCreationException(e.getMessage()).initCause(e);
            log.debug("throwing ", deploymentManagerCreationException);
            throw deploymentManagerCreationException;
        } catch (SecurityException e) {
            AuthenticationFailedException authenticationFailedException =
                    (AuthenticationFailedException) new AuthenticationFailedException("Invalid login.").initCause(e);
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

            if (params.getProtocol().equals("jmx") || params.getProtocol().equals("jmxs")) {
                return newRemoteDeploymentManager(username, password, params);
            } else if(params.getProtocol().equals("inVM")) {
                return new LocalDeploymentManager(KernelRegistry.getKernel(params.getHost()));
            } else {
                throw new DeploymentManagerCreationException("Invalid URI: " + uri);
            }
        } catch (RuntimeException e) {
            // some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
            log.error(e.getMessage(), e);
            throw e;
        } catch (Error e) {
            // some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
            log.error(e.getMessage(), e);
            throw e;
        } catch (IOException e) {
            log.error(e.getMessage(), e);
            throw new DeploymentManagerCreationException(e.getMessage());
        }
    }
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

            if(!manager.isSameMachine()) {
                manager.setAuthentication(username, password);
            }
            return manager;
        } catch (IOException e) {
            DeploymentManagerCreationException deploymentManagerCreationException =
                    (DeploymentManagerCreationException) new DeploymentManagerCreationException(e.getMessage()).initCause(e);
            log.debug("throwing ", deploymentManagerCreationException);
            throw deploymentManagerCreationException;
        } catch (SecurityException e) {
            AuthenticationFailedException authenticationFailedException =
                    (AuthenticationFailedException) new AuthenticationFailedException("Invalid login.").initCause(e);
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

                    JMXServiceURL address = new JMXServiceURL("service:" + uri);
                    JMXConnector jmxConnector = JMXConnectorFactory.connect(address, environment);
                    JMXDeploymentManager manager = new JMXDeploymentManager(jmxConnector);
                    return manager;
                } catch (IOException e) {
                    throw (DeploymentManagerCreationException)new DeploymentManagerCreationException(e.getMessage()).initCause(e);
                } catch (SecurityException e) {
                    throw (AuthenticationFailedException) new AuthenticationFailedException("Invalid login.").initCause(e);
                }
            } else {
                throw new DeploymentManagerCreationException("Invalid URI: " + uri);
            }
        } catch (RuntimeException e) {
            // some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
            e.printStackTrace();
            throw e;
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

        ROOT_LOGGER.debugf("getDeploymentManager (uri=%s)", uri);
        try {
            URI deployURI = parseURI(uri);
            return new DeploymentManagerImpl(deployURI, true, userName, password);
        } catch (URISyntaxException e) {
            DeploymentManagerCreationException ex = new DeploymentManagerCreationException("Failed to create DeploymentManagerImpl");
            ex.initCause(e);
            throw ex;
        }
    }
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

        ROOT_LOGGER.debugf("getDisconnectedDeploymentManager (uri=%s)", uri);
        try {
            URI deployURI = parseURI(uri);
            return new DeploymentManagerImpl(deployURI, false);
        } catch (URISyntaxException e) {
            DeploymentManagerCreationException ex = new DeploymentManagerCreationException("Failed to create DeploymentManagerImpl");
            ex.initCause(e);
            throw ex;
        }
    }
View Full Code Here

Examples of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

        }
    }

    public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException {
        if (!handlesURI(uri)) {
            throw new DeploymentManagerCreationException("Invalid URI: " + uri);
        }

        return new OpenEJBDeploymentManager();
    }
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.