Package javax.ejb.embeddable

Examples of javax.ejb.embeddable.EJBContainer


    public void execute() throws MojoExecutionException, MojoFailureException {
        MavenLogStreamFactory.setLogger(getLog());
        final ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(createClassLoader(oldCl));

        EJBContainer container = null;
        try {
            container = EJBContainer.createEJBContainer(map());
            if (await) {
                final CountDownLatch latch = new CountDownLatch(1);
                Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
                    @Override
                    public void run() {
                        latch.countDown();
                    }
                }));
                try {
                    latch.await();
                } catch (InterruptedException e) {
                    // ignored
                }
            }
        } finally {
            if (container != null) {
                container.close();
            }
            Thread.currentThread().setContextClassLoader(oldCl);
        }
    }
View Full Code Here

TOP

Related Classes of javax.ejb.embeddable.EJBContainer

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.