From 97231caaf2a7ef9d958864657b92a89b790b0007 Mon Sep 17 00:00:00 2001 From: nathan Date: Sat, 20 Sep 2014 02:17:25 +0200 Subject: [PATCH] Removed dependency on JavaLauncher, it's now JavaLauncher-Util -- which is shared --- Dorkbox-Network/.classpath | 1 + .../remote/RegistrationRemoteHandler.java | 5 +++++ .../src/dorkbox/network/util/udt/UdtJniLoader.java | 14 +++++++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Dorkbox-Network/.classpath b/Dorkbox-Network/.classpath index e450d959..8cb30f55 100644 --- a/Dorkbox-Network/.classpath +++ b/Dorkbox-Network/.classpath @@ -2,6 +2,7 @@ + diff --git a/Dorkbox-Network/src/dorkbox/network/connection/registration/remote/RegistrationRemoteHandler.java b/Dorkbox-Network/src/dorkbox/network/connection/registration/remote/RegistrationRemoteHandler.java index 8efe2884..0ee39849 100644 --- a/Dorkbox-Network/src/dorkbox/network/connection/registration/remote/RegistrationRemoteHandler.java +++ b/Dorkbox-Network/src/dorkbox/network/connection/registration/remote/RegistrationRemoteHandler.java @@ -226,6 +226,11 @@ public abstract class RegistrationRemoteHandler extends RegistrationHandler { // add the "connected"/"normal" handler now that we have established a "new" connection. // This will have state, etc. for this connection. ConnectionImpl connection = (ConnectionImpl) this.registrationWrapper.connection0(metaChannel); + + + // to have connection notified via the disruptor, we have to specify a custom ChannelHandlerInvoker. +// ChannelHandlerInvoker channelHandlerInvoker = new ChannelHandlerInvoker(); + tcpPipe.addLast(CONNECTION_HANDLER, connection); if (udpPipe != null) { diff --git a/Dorkbox-Network/src/dorkbox/network/util/udt/UdtJniLoader.java b/Dorkbox-Network/src/dorkbox/network/util/udt/UdtJniLoader.java index eefcd4e4..07060efd 100644 --- a/Dorkbox-Network/src/dorkbox/network/util/udt/UdtJniLoader.java +++ b/Dorkbox-Network/src/dorkbox/network/util/udt/UdtJniLoader.java @@ -18,7 +18,7 @@ public class UdtJniLoader implements LibraryLoader { public void load(String location) throws Exception { boolean isNativeDeployed = false; try { - Class exitClass = Class.forName("dorkbox.launcher.Exit"); + Class exitClass = Class.forName("dorkbox.exit.Exit"); if (exitClass != null) { Method nativeMethod = exitClass.getMethod("isNative"); @@ -30,8 +30,12 @@ public class UdtJniLoader implements LibraryLoader { } catch (Throwable t) { } - // we only want to load ourselves if we are NOT deployed, since our DEPLOYMENT handles loading libraries on it's own. - if (!isNativeDeployed) { + if (isNativeDeployed) { + // specify that we want to use our temp dir as the extraction location. + String tmpDir = System.getProperty("java.io.tmpdir"); + ResourceUDT.setLibraryExtractLocation(tmpDir); + } else { + // we only want to load ourselves if we are NOT deployed, since our DEPLOYMENT handles loading libraries on it's own. File tempFile = File.createTempFile("temp", null).getAbsoluteFile(); location = tempFile.getParent(); tempFile.delete(); @@ -43,10 +47,6 @@ public class UdtJniLoader implements LibraryLoader { LibraryLoaderUDT loader = new LibraryLoaderUDT(); loader.load(location); - } else { - // specify that we want to use our temp dir as the extraction location. - String tmpDir = System.getProperty("java.io.tmpdir"); - ResourceUDT.setLibraryExtractLocation(tmpDir); } } }