Package javax.enterprise.deploy.spi.exceptions

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


        return URI_SCHEME.equals(fullUri.getScheme());
    }

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

        VmDeploymentManager deploymentManager = new VmDeploymentManager();
        deploymentManager.release();
        return deploymentManager;
View Full Code Here


            if (field.getType().equals(DConfigBeanVersionType.class) && Modifier.isStatic(field.getModifiers())) {
                return (DConfigBeanVersionType) field.get(null);
            }
        } catch (Exception e) {
        }
        throw new DeploymentManagerCreationException("Unknown DConfig bean version: " + string);
    }
View Full Code Here

                    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);
                }
            } 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
            e.printStackTrace();
            throw e;
View Full Code Here

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

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

        return OpenEJBDeploymentFactory.URI_SCHEME.equals(fullUri.getScheme());
    }

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

        return new OpenEJBDeploymentManager();
    }
View Full Code Here

    }

    public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException {
        URI protocolUri = getProtocolUri(uri);
        if (protocolUri == null) {
            throw new DeploymentManagerCreationException("Invalid URI: " + uri);
        }

        try {
            Deployment deployment = factory.createDeployment(protocolUri, username, password);
            return new OpenEJBDeploymentManager(deployment);
        } catch (RuntimeException e) {
            // some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
            DeploymentManagerCreationException creationException = new DeploymentManagerCreationException("Unexpected exception while creating deployment manager");
            creationException.initCause(e);
            throw creationException;
        } catch (AssertionError e) {
            // some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
            DeploymentManagerCreationException creationException = new DeploymentManagerCreationException("Assertion error while creating deployment manager");
            creationException.initCause(e);
            throw creationException;
        }
    }
View Full Code Here

            return remoteDeploymentManager;
        }
        try {
            return kernel.getGBean(RemoteDeploymentManager.class);
        } catch (Exception e) {
            throw (DeploymentManagerCreationException) new DeploymentManagerCreationException("See nested").initCause(e);
        }
    }
View Full Code Here

            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

            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

TOP

Related Classes of javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException

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.