Package org.apache.openejb.testng

Examples of org.apache.openejb.testng.PropertiesBuilder


        port = NetworkUtil.getNextAvailablePort();
    }

    @Configuration
    public Properties props() {
        return new PropertiesBuilder()
            .p("httpejbd.port", Integer.toString(port))
            .p(OpenEjbContainer.OPENEJB_EMBEDDED_REMOTABLE, "true")
            .build();
    }
View Full Code Here


        port = NetworkUtil.getNextAvailablePort();
    }

    @Configuration
    public Properties props() {
        return new PropertiesBuilder()
            .p("httpejbd.port", Integer.toString(port))
            .p(OpenEjbContainer.OPENEJB_EMBEDDED_REMOTABLE, "true")
            .build();
    }
View Full Code Here

        port = NetworkUtil.getNextAvailablePort();
    }

    @Configuration
    public Properties props() {
        return new PropertiesBuilder().p("httpejbd.port", Integer.toString(port)).build();
    }
View Full Code Here

    @Test
    public void invoke() throws Exception {
        final EjbServer ejbServer = new EjbServer();

        OpenEJB.init(new PropertiesBuilder().p(DeploymentsResolver.DEPLOYMENTS_CLASSPATH_PROPERTY, "false").build(), new ServerFederation());
        ejbServer.init(new Properties());

        final ServiceDaemon serviceDaemon = new ServiceDaemon(ejbServer, 0, "localhost");
        serviceDaemon.start();

        final int port = serviceDaemon.getPort();

        final Assembler assembler = SystemInstance.get().getComponent(Assembler.class);
        final ConfigurationFactory config = new ConfigurationFactory();

        final EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new StatelessBean(RemoteWithSecurity.class));
        assembler.createApplication(config.configureApplication(ejbJar));

        try {

            final Context context = new InitialContext(new PropertiesBuilder()
                .p(Context.INITIAL_CONTEXT_FACTORY, RemoteInitialContextFactory.class.getName())
                .p(Context.PROVIDER_URL, "ejbd://127.0.0.1:" + port)
                .p(JNDIContext.AUTHENTICATE_WITH_THE_REQUEST, "true")
                .p("java.naming.security.principal", "foo")
                .p("java.naming.security.credentials", "bar")
View Full Code Here

        port = NetworkUtil.getNextAvailablePort();
    }

    @Configuration
    public Properties props() {
        return new PropertiesBuilder()
            .p("httpejbd.port", Integer.toString(port))
            .p(OpenEjbContainer.OPENEJB_EMBEDDED_REMOTABLE, "true")
            .build();
    }
View Full Code Here

        port = NetworkUtil.getNextAvailablePort();
    }

    @Configuration
    public Properties props() {
        return new PropertiesBuilder().p("httpejbd.port", Integer.toString(port)).build();
    }
View Full Code Here

public class AMQXASupportTest {
    private static final String TEXT = "foo";

    @Configuration
    public Properties config() {
        return new PropertiesBuilder()

            .p("amq", "new://Resource?type=ActiveMQResourceAdapter")
            .p("amq.DataSource", "")
            .p("amq.BrokerXmlConfig", "broker:(vm://localhost)")
View Full Code Here

@RunWith(ApplicationComposer.class)
public class CustomInjectionTest {
    @Configuration
    public Properties configuration() {
        return new PropertiesBuilder()

            .property("concurrent/es", "new://Resource?type=ManagedExecutorService")
            .property("concurrent/es.core", "2")
            .property("concurrent/es.max", "10")
            .property("concurrent/es.keepAlive", "4 minutes")
View Full Code Here

        names[1] = new ObjectName("openejb.management:j2eeType=JAX-WS,J2EEServer=openejb,J2EEApplication=<empty>,EndpointType=POJO,name=AnPojoEndpoint");
    }

    @Configuration
    public Properties props() {
        return new PropertiesBuilder()
            .p("httpejbd.port", Integer.toString(port))
            .p(OpenEjbContainer.OPENEJB_EMBEDDED_REMOTABLE, "true")
            .build();
    }
View Full Code Here

        port = NetworkUtil.getNextAvailablePort();
    }

    @Configuration
    public Properties props() {
        return new PropertiesBuilder().p("httpejbd.port", Integer.toString(port)).build();
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.testng.PropertiesBuilder

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.