Package org.jboss.msc.service

Examples of org.jboss.msc.service.StartException


    }

    @Override
    public void start(StartContext context) throws StartException {
        if (!started.compareAndSet(false, true)) {
            throw new StartException("The service is still started!");
        }
        LOGGER.info("Start HASingleton timer service '" + this.getClass().getName() + "'");
       
        try {
            InitialContext ic = new InitialContext();
            ((Scheduler) ic.lookup("global/wildfly-cluster-ha-singleton-service/SchedulerBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Scheduler")).initialize("HASingleton timer @" + this.env.getValue().getNodeName() + " " + new Date());
        } catch (NamingException e) {
            throw new StartException("Could not initialize timer", e);
        }
    }
View Full Code Here


                managedBinding = registerSocketBinding(sbm);
            }
            log.infof("Listening on %s", getSocketAddress());

        } catch (BindException e) {
            throw new StartException(e.getMessage() + " " + getSocketAddress(), e);
        } catch (Exception e) {
            // AutoGenerated
            throw new StartException(e);
        }
    }
View Full Code Here

    public void start(StartContext startContext) throws StartException {
        String path = tmpDirValue.getValue();
        File authDir = new File(path, "auth");
        if (authDir.exists()) {
            if (authDir.isDirectory() == false) {
                throw new StartException("Unable to create tmp dir for auth tokens as file already exists.");
            }
        } else if (authDir.mkdirs() == false) {
            throw new StartException("Unable to create auth dir.");
        } else {
            // As a precaution make perms user restricted for directories created (if the OS allows)
            authDir.setWritable(false, false);
            authDir.setWritable(true, true);
            authDir.setReadable(false, false);
View Full Code Here

                if (! ok) {
                    endpoint.closeAsync();
                }
            }
        } catch (IOException e) {
            throw new StartException("Failed to start service", e);
        }
        this.endpoint = endpoint;
    }
View Full Code Here

        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

        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

        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.setMaxBackupIndex(maxBackupIndex);
        handler.setRotateSize(rotateSize);
    }
View Full Code Here

        formatterSpec.apply(handler);
        if (level != null) handler.setLevel(level);
        try {
            handler.setEncoding(encoding);
        } catch (UnsupportedEncodingException e) {
            throw new StartException(e);
        }
        // Set the properties
        setProperties(handler, properties);
        value = handler;
    }
View Full Code Here

        if (filter != null) handler.setFilter(filter);
        handler.setAutoFlush(autoflush);
        try {
            handler.setEncoding(encoding);
        } catch (UnsupportedEncodingException e) {
            throw new StartException(e);
        }
    }
View Full Code Here

        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.setMaxBackupIndex(maxBackupIndex);
        handler.setRotateSize(rotateSize);
    }
View Full Code Here

TOP

Related Classes of org.jboss.msc.service.StartException

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.