Search in sources :

Example 11 with Deployer

use of org.apache.openejb.assembler.Deployer in project tomee by apache.

the class ContainersImplTomEE method lookup.

private Deployer lookup() {
    final Options options = new Options(System.getProperties());
    final Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY, RemoteInitialContextFactory.class.getName());
    props.put(Context.PROVIDER_URL, options.get(Context.PROVIDER_URL, "http://localhost:" + port + "/tomee/ejb"));
    final String deployerJndi = System.getProperty("openejb.deployer.jndiname", "openejb/DeployerBusinessRemote");
    try {
        final InitialContext context = new InitialContext(props);
        return (Deployer) context.lookup(deployerJndi);
    } catch (final Exception e) {
        throw new OpenEJBTCKRuntimeException(e);
    }
}
Also used : Options(org.apache.openejb.loader.Options) RemoteInitialContextFactory(org.apache.openejb.client.RemoteInitialContextFactory) OpenEJBTCKRuntimeException(org.apache.openejb.tck.OpenEJBTCKRuntimeException) Properties(java.util.Properties) InitialContext(javax.naming.InitialContext) Deployer(org.apache.openejb.assembler.Deployer) OpenEJBTCKRuntimeException(org.apache.openejb.tck.OpenEJBTCKRuntimeException) IOException(java.io.IOException) ValidationException(org.apache.openejb.config.ValidationException) DeploymentException(org.jboss.testharness.api.DeploymentException)

Aggregations

Deployer (org.apache.openejb.assembler.Deployer)11 Properties (java.util.Properties)8 InitialContext (javax.naming.InitialContext)7 File (java.io.File)4 NamingException (javax.naming.NamingException)4 OpenEJBException (org.apache.openejb.OpenEJBException)3 AppInfo (org.apache.openejb.assembler.classic.AppInfo)3 IOException (java.io.IOException)2 ServiceUnavailableException (javax.naming.ServiceUnavailableException)2 CommandLine (org.apache.commons.cli.CommandLine)2 CommandLineParser (org.apache.commons.cli.CommandLineParser)2 Options (org.apache.commons.cli.Options)2 ParseException (org.apache.commons.cli.ParseException)2 PosixParser (org.apache.commons.cli.PosixParser)2 UndeployException (org.apache.openejb.UndeployException)2 SystemExitException (org.apache.openejb.cli.SystemExitException)2 RemoteInitialContextFactory (org.apache.openejb.client.RemoteInitialContextFactory)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 FileInputStream (java.io.FileInputStream)1 ArrayList (java.util.ArrayList)1