Search in sources :

Example 1 with WildflyLookup

use of eu.ggnet.dwoss.assembly.remote.lookup.WildflyLookup in project dwoss by gg-net.

the class RunClientFx method init.

@Override
public void init() throws Exception {
    LoggerFactory.getLogger(RunClientFx.class).info("JavaFx init");
    System.out.println("JavaFx init");
    String key = discoverConfigParameters();
    // Go to default, but inform on console abaout usage.
    if (!Configurations.containsConfig(key))
        usage(key);
    lookupConfig = Configurations.getConfigOrDefault(key);
    WildflyLookup wildflyLookup = new WildflyLookup(lookupConfig);
    Dl.local().add(RemoteLookup.class, wildflyLookup);
    Toolkit.getDefaultToolkit().getSystemEventQueue().push(new UnhandledExceptionCatcher());
    UiCore.overwriteFinalExceptionConsumer(new DwFinalExceptionConsumer());
    UiCore.registerExceptionConsumer(UserInfoException.class, new UserInfoExceptionConsumer());
    UiCore.registerExceptionConsumer(ConstraintViolationException.class, new ConstraintViolationConsumer());
    verifyRemoteConnection();
    EventQueue.invokeAndWait(() -> {
        swingClient = new SwingClient() {

            @Override
            protected void close() {
                System.out.println("Calling Close");
                Platform.exit();
                // Again, not perfect, but otherwise the application dosen't close and I don't know why yet.
                System.exit(0);
            }
        };
        swingClient.init();
    });
}
Also used : WildflyLookup(eu.ggnet.dwoss.assembly.remote.lookup.WildflyLookup) SwingClient(eu.ggnet.saft.runtime.SwingClient)

Example 2 with WildflyLookup

use of eu.ggnet.dwoss.assembly.remote.lookup.WildflyLookup in project dwoss by gg-net.

the class TestWildfly method tryRemoteLookupImplementation.

public static void tryRemoteLookupImplementation() {
    WildflyLookup l = new WildflyLookup(EjbConnectionConfiguration.builder().host("localhost").port(8080).username("admin").password("admin").app("dwoss-server").build());
    Mandators supporter = l.lookup(Mandators.class);
    Mandator mandator = supporter.loadMandator();
    System.out.println(mandator);
    System.out.println(mandator.getDocumentIntermix().toMultiLine());
}
Also used : Mandators(eu.ggnet.dwoss.mandator.Mandators) WildflyLookup(eu.ggnet.dwoss.assembly.remote.lookup.WildflyLookup) Mandator(eu.ggnet.dwoss.mandator.api.value.Mandator)

Aggregations

WildflyLookup (eu.ggnet.dwoss.assembly.remote.lookup.WildflyLookup)2 Mandators (eu.ggnet.dwoss.mandator.Mandators)1 Mandator (eu.ggnet.dwoss.mandator.api.value.Mandator)1 SwingClient (eu.ggnet.saft.runtime.SwingClient)1