Examples of StartException


Examples of org.jboss.msc.service.StartException

        handler.setAutoFlush(autoflush);
        if (filter != null) handler.setFilter(filter);
        try {
            handler.setEncoding(encoding);
        } catch (UnsupportedEncodingException e) {
            throw new StartException(e);
        }
        Handler[] handlers = new Handler[subhandlers.size()];
        for (int i = 0, subhandlersSize = subhandlers.size(); i < subhandlersSize; i++) {
            handlers[i] = subhandlers.get(i).getValue();
        }
View Full Code Here

Examples of org.jboss.msc.service.StartException

        if (level != null) handler.setLevel(level);
        handler.setAutoFlush(autoflush);
        try {
            handler.setEncoding(encoding);
        } catch (UnsupportedEncodingException e) {
            throw new StartException(e);
        }
        handler.setAppend(append);
        try {
            handler.setFileName(fileName.getValue());
        } catch (FileNotFoundException e) {
            throw new StartException(e);
        }
        value = handler;
    }
View Full Code Here

Examples of org.jboss.msc.service.StartException

        if (level != null) handler.setLevel(level);
        handler.setAutoFlush(autoflush);
        try {
            handler.setEncoding(encoding);
        } catch (UnsupportedEncodingException e) {
            throw new StartException(e);
        }
        handler.setAppend(append);
        try {
            handler.setFileName(fileName.getValue());
        } catch (FileNotFoundException e) {
            throw new StartException(e);
        }
        handler.setSuffix(suffix);
    }
View Full Code Here

Examples of org.jboss.msc.service.StartException

            injectedDeploymentRepository.getValue();
            type = ShutdownHandler.class.getSimpleName();
            injectedShutdownHandler.getValue();
        }
        catch (IllegalStateException ise) {
            throw new StartException(type + " was not injected");
        }

    }
View Full Code Here

Examples of org.jboss.msc.service.StartException

        ServerEnvironment env = null;
        try {
            env = serverEnvironment.getValue();
        }
        catch (IllegalStateException ise) {
            throw new StartException(ServerEnvironment.class.getSimpleName() + " was not injected");
        }

        File deployDir = env.getServerDeployDir();
        if (deployDir == null)
            throw new IllegalArgumentException("deployDir is null");
        if (deployDir.exists()) {
            if (!deployDir.isDirectory()) {
                throw new IllegalStateException("Deployment repository root " + deployDir.getAbsolutePath() + " is not a directory");
            }
            else if (!deployDir.canWrite()) {
                throw new IllegalStateException("Deployment repository root " + deployDir.getAbsolutePath() + " is not a writable");
            }
        }
        else if (!deployDir.mkdirs()) {
            throw new IllegalStateException("Failed to create a directory at " + deployDir.getAbsolutePath());
        }

        this.repoRoot = deployDir;

        try {
            this.messageDigest = MessageDigest.getInstance("SHA-1");
        } catch (NoSuchAlgorithmException e) {
            throw new StartException("Cannot obtain SHA-1 " + MessageDigest.class.getSimpleName(), e);
        }

        log.debugf("%s started", ServerDeploymentRepository.class.getSimpleName());
    }
View Full Code Here

Examples of org.jboss.msc.service.StartException

            config.setConnectionHandler(this);

            server = new ProtocolServer(config);
            server.start();
        } catch (Exception e) {
            throw new StartException("Failed to start server socket", e);
        }
    }
View Full Code Here

Examples of org.jboss.msc.service.StartException

            shutdownHandler = shutdownHandlerValue.getValue();
            deploymentManager = deploymentManagerValue.getValue();
            deploymentRepository = deploymentRepositoryValue.getValue();
            executor = executorValue.getValue();
        } catch (IllegalStateException e) {
            throw new StartException(e);
        }
    }
View Full Code Here

Examples of org.jboss.msc.service.StartException

                    sc = builder.install();
                }
                return (InstancesService) sc.getService();
            } catch (DuplicateServiceException ignored) {
            } catch (Exception e) {
                throw new StartException(e);
            }
        }
    }
View Full Code Here

Examples of org.jboss.msc.service.StartException

                describedPojoPhase.setBeanInfo(beanInfo);
            }
        } catch (StartException t) {
            throw t;
        } catch (Throwable t) {
            throw new StartException(t);
        }
        super.startInternal(context);
    }
View Full Code Here

Examples of org.jboss.msc.service.StartException

            if (beanClass != null) {
                Class clazz = Class.forName(beanClass, false, getModule().getClassLoader());
                setBeanInfo(new DefaultBeanInfo(getIndex(), clazz));
            }
        } catch (Exception e) {
            throw new StartException(e);
        }
        super.startInternal(context);
    }
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.