Search in sources :

Example 21 with Options

use of org.apache.openejb.loader.Options 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

Options (org.apache.openejb.loader.Options)21 IOException (java.io.IOException)7 OpenEJBException (org.apache.openejb.OpenEJBException)5 Properties (java.util.Properties)4 NamingException (javax.naming.NamingException)4 InvocationTargetException (java.lang.reflect.InvocationTargetException)3 ArrayList (java.util.ArrayList)3 TimeoutException (java.util.concurrent.TimeoutException)3 MBeanServer (javax.management.MBeanServer)3 MalformedObjectNameException (javax.management.MalformedObjectNameException)3 ObjectName (javax.management.ObjectName)3 ApplicationException (org.apache.openejb.ApplicationException)3 SystemException (org.apache.openejb.SystemException)3 OptionsLog (org.apache.openejb.util.OptionsLog)3 URL (java.net.URL)2 RemoteException (java.rmi.RemoteException)2 HashSet (java.util.HashSet)2 LinkedHashSet (java.util.LinkedHashSet)2 AttributeNotFoundException (javax.management.AttributeNotFoundException)2 InstanceNotFoundException (javax.management.InstanceNotFoundException)2