Package org.openengsb.itests.remoteclient

Examples of org.openengsb.itests.remoteclient.SecureSampleConnector


    @Test
    public void testRaiseEvent_shouldForwardToRemoteConnector() throws Exception {
        featuresService.installFeature("openengsb-ports-jms");
        String openwirePort = getConfigProperty("org.openengsb.infrastructure.jms", "openwire");
        SecureSampleConnector remoteConnector = new SecureSampleConnector(openwirePort);
        final AtomicReference<Event> eventRef = new AtomicReference<Event>();
        Map<String, String> attributes = new HashMap<String, String>();
        Map<String, Object> properties = new HashMap<String, Object>();
        attributes.put("mixin.1", EventSupport.class.getName());
        remoteConnector.start(new MyExampleConnector(eventRef),
                new ConnectorDescription("example", "external-connector-proxy", attributes, properties));
        WorkflowService workflowService = getOsgiService(WorkflowService.class);
        Event event = new Event("test");
        ContextHolder.get().setCurrentContextId("foo");
        authenticateAsAdmin();
View Full Code Here


        authenticateAsAdmin();

        // make sure jms is up and running
        utilsService.getServiceWithId(OutgoingPort.class, "jms-json", 60000);

        SecureSampleConnector remoteConnector = new SecureSampleConnector(openwirePort);
        remoteConnector.start(new ExampleConnector(), new ConnectorDescription("example", "external-connector-proxy"));
        ExampleDomain osgiService = getOsgiService(ExampleDomain.class, "(service.pid=example-remote)", 31000);

        assertThat(getBundleContext().getServiceReferences(ExampleDomain.class.getName(),
            "(service.pid=example-remote)"), not(nullValue()));
        assertThat(osgiService, not(nullValue()));

        remoteConnector.getInvocationHistory().clear();
        osgiService.doSomethingWithMessage("test");
        assertThat(remoteConnector.getInvocationHistory().isEmpty(), is(false));

        remoteConnector.stop();
       
        boolean unregistered = false;
       
        for (int i = 0; i < 5; i++) {
            Thread.sleep(1000);
View Full Code Here

TOP

Related Classes of org.openengsb.itests.remoteclient.SecureSampleConnector

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.