Package org.apache.openejb.server

Examples of org.apache.openejb.server.ServiceException


        if (!this.running.getAndSet(true)) {

            try {
                this.sockets = getSockets(this.multicast, this.port);
            } catch (final Exception e) {
                throw new ServiceException("Failed to get Multicast sockets", e);
            }

            final CountDownLatch latch = new CountDownLatch(this.sockets.length);
            final String mpg = this.group;
            final boolean isLoopBackOnly = this.loopbackOnly;
View Full Code Here


        final InetAddress ia;

        try {
            ia = InetAddress.getByName(multicastAddress);
        } catch (final UnknownHostException e) {
            throw new ServiceException(multicastAddress + " is not a valid address", e);
        }

        if (null == ia || !ia.isMulticastAddress()) {
            throw new ServiceException(multicastAddress + " is not a valid multicast address");
        }

        return getSockets(ia, port);
    }
View Full Code Here

            super.start();
            try {
                uri = new URI("ejb:ejbd://localhost:" + getPort() + "/" + host);
                agent.registerService(uri);
            } catch (final Exception e) {
                throw new ServiceException(e);
            }
        }
View Full Code Here

        public void stop() throws ServiceException {
            super.stop();
            try {
                agent.unregisterService(uri);
            } catch (final Exception e) {
                throw new ServiceException(e);
            }
        }
View Full Code Here

    public void start() throws ServiceException {
        try {
            server.start();
        } catch (Exception e) {
            throw new ServiceException(e);
        }
    }
View Full Code Here

    public void stop() throws ServiceException {
        try {
            server.stop();
        } catch (Exception e) {
            throw new ServiceException(e);
        }
    }
View Full Code Here

            serverControl = new NetworkServerControl(host, port);
            //serverControl.setMaxThreads(threads);

            serverControl.start(new Log4jPrintWriter("Derby", Priority.INFO));
        } catch (Exception e) {
            throw new ServiceException(e);
        }
    }
View Full Code Here

            return;
        }
        try {
            serverControl.shutdown();
        } catch (Exception e) {
            throw new ServiceException(e);
        } finally {
            serverControl = null;
        }
    }
View Full Code Here

            super.start();
            try {
                uri = new URI("ejb:ejbd://localhost:" + getPort() + "/" + host);
                agent.registerService(uri);
            } catch (final Exception e) {
                throw new ServiceException(e);
            }
        }
View Full Code Here

        public void stop() throws ServiceException {
            super.stop();
            try {
                agent.unregisterService(uri);
            } catch (final Exception e) {
                throw new ServiceException(e);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.openejb.server.ServiceException

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.