Removed dependency on JavaLauncher, it's now JavaLauncher-Util -- which is shared

This commit is contained in:
nathan 2014-09-20 02:17:25 +02:00
parent 656dda355f
commit 97231caaf2
3 changed files with 13 additions and 7 deletions

View File

@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry excluding="src/|test/" kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="/Dependencies/kryo/jsonbeans-0.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

View File

@ -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) {

View File

@ -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);
}
}
}