Package org.apache.openejb.tck

Examples of org.apache.openejb.tck.OpenEJBTCKRuntimeException


        String port = System.getProperty("server.http.port");
        if (port != null) {
            System.out.println("provider url = " + "http://localhost:" + port + "/tomee/ejb");
            props.put(Context.PROVIDER_URL, options.get(Context.PROVIDER_URL,"http://localhost:" + port + "/tomee/ejb"));
        } else {
            throw new OpenEJBTCKRuntimeException("Please set the tomee port as a system property");
        }

        try {
            InitialContext context = new InitialContext(props);
            return (ExceptionManagerFacade) context.lookup("openejb/ExceptionManagerFacadeRemote");
        } catch (Exception e) {
            throw new OpenEJBTCKRuntimeException(e);
        }
    }
View Full Code Here


            while ((bytesRead = archive.read(buffer)) > -1) {
                fos.write(buffer, 0, bytesRead);
            }
            Util.close(fos);
        } catch (Exception e) {
            throw new OpenEJBTCKRuntimeException(e);
        }
    }
View Full Code Here

            while ((bytesRead = archive.read(buffer)) > -1) {
                fos.write(buffer, 0, bytesRead);
            }
            Util.close(fos);
        } catch (Exception e) {
            throw new OpenEJBTCKRuntimeException(e);
        }
    }
View Full Code Here

        System.out.println("Undeploying " + name);
        try {
            container.undeploy(name);
        } catch (Exception e) {
            e.printStackTrace();
            throw new OpenEJBTCKRuntimeException(e);
        }

        File file = FILES.remove(name);
        System.out.println("deleting " + file.getAbsolutePath());
        FileUtils.deleteDirectory(file);
View Full Code Here

        try {
            final InitialContext context = new InitialContext(props);
            return (Deployer) context.lookup(deployerJndi);
        } catch (final Exception e) {
            throw new OpenEJBTCKRuntimeException(e);
        }
    }
View Full Code Here

        System.out.println("Undeploying " + name);
        try {
            deployer.undeploy(appInfo.path);
        } catch (final Exception e) {
            e.printStackTrace();
            throw new OpenEJBTCKRuntimeException(e);
        }

        final File toDelete;
        if (currentFile != null && (toDelete = currentFile.getParentFile()).exists()) {
            System.out.println("deleting " + toDelete.getAbsolutePath());
View Full Code Here

            // Complete the ZIP file
            out.close();

            this.in = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
        } catch (IOException e) {
            throw new OpenEJBTCKRuntimeException(e);
        }
    }
View Full Code Here

        final int port = ServerLocal.getPort(-1);
        if (port > 0) {
            server = new RemoteServer(100, true);
            server.setPortStartup(port);
        } else {
            throw new OpenEJBTCKRuntimeException("Please set the tomee port using the system property 'server.http.port'");
        }

        try {
            server.start();
        } catch (final RuntimeException e) {
View Full Code Here

        final int port = ServerLocal.getPort(-1);
        if (port > 0) {
            System.out.println("provider url = " + "http://localhost:" + port + "/tomee/ejb");
            props.put(Context.PROVIDER_URL, options.get(Context.PROVIDER_URL, "http://localhost:" + port + "/tomee/ejb"));
        } else {
            throw new OpenEJBTCKRuntimeException("Please set the tomee port using the system property 'server.http.port'");
        }

        try {
            final InitialContext context = new InitialContext(props);
            return (ExceptionManagerFacade) context.lookup("openejb/ExceptionManagerFacadeBusinessRemote");
        } catch (final Exception e) {
            throw new OpenEJBTCKRuntimeException(e);
        }
    }
View Full Code Here

            while ((bytesRead = archive.read(buffer)) > -1) {
                fos.write(buffer, 0, bytesRead);
            }
            Util.close(fos);
        } catch (Exception e) {
            throw new OpenEJBTCKRuntimeException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.tck.OpenEJBTCKRuntimeException

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.