Package javax.enterprise.deploy.spi.exceptions

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


   */
  private DeploymentManagerImpl createManager(String uri)
    throws DeploymentManagerCreationException
  {
    if (! handlesURI(uri))
      throw new DeploymentManagerCreationException("'" + uri + "' is an unsupported deployment URI.");

    return new DeploymentManagerImpl(uri);
  }
View Full Code Here


            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

                manager.setAuthentication(username, password);
            }
            return manager;
        } catch (IOException e) {
            log.fatal("caught ", e);
            DeploymentManagerCreationException deploymentManagerCreationException =
                    (DeploymentManagerCreationException) new DeploymentManagerCreationException(e.getMessage()).initCause(e);
            log.fatal("throwing ", deploymentManagerCreationException);
            throw deploymentManagerCreationException;
        } catch (SecurityException e) {
            if (log.isDebugEnabled()) {
                log.debug("caught ", e);
View Full Code Here

                if(manager != null) {
                    return manager;
                }
            }
        }
        throw new DeploymentManagerCreationException("Could not get DeploymentManager; No registered DeploymentFactory handles this URI");
    }
View Full Code Here

                if(manager != null) {
                    return manager;
                }
            }
        }
        throw new DeploymentManagerCreationException("Could not get DeploymentManager; No registered DeploymentFactory handles this URI");
    }
View Full Code Here

        }
    }

    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

        }
    }

    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(!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

   
    protected RemoteDeploymentManager getRemoteDeploymentManager() throws DeploymentManagerCreationException {
        try {
            return (RemoteDeploymentManager) kernel.getGBean(RemoteDeploymentManager.class);
        } catch (Exception e) {
            throw (DeploymentManagerCreationException) new DeploymentManagerCreationException("See nested").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.