Package javax.enterprise.deploy.spi.exceptions

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


        }
    }

    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


   
    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

            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

            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

                    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
            log.error(e.getMessage(), e);
            throw e;
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

                    return factories[factoryIndex].getDeploymentManager(uri,
              username,password);
                }
            }
            // No available factory supports the provided url.
            throw new DeploymentManagerCreationException("URL ["+uri+
        "] not supported by any available factories");
        }catch(Throwable t){
            throw new DeploymentManagerCreationException(
        "Could not get DeploymentManager");
        }
    }
View Full Code Here

                if(factories[factoryIndex].handlesURI(uri)){
                    return factories[factoryIndex].getDisconnectedDeploymentManager(uri);
                }
            }
            // No available factory supports the provided url.
            throw new DeploymentManagerCreationException("URL ["+uri+
        "] not supported by any available factories");
        }catch(Throwable t){
            throw new DeploymentManagerCreationException(
        "Could not get DeploymentManager");
        }
    }
View Full Code Here

                return (DConfigBeanVersionType) field.get(null);
            }
        } catch (final Exception e) {
            // no-op
        }
        throw new DeploymentManagerCreationException("Unknown DConfig bean version: " + string);
    }
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

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.