# HG changeset patch # User Simon Tooke # Date 1488897846 18000 # Node ID 2885a4a290d0f42e16b4f28689e5ef316985b66f # Parent 3e0b81d9b2916eac3d8d6a05745fdffd0afdae26 [PATCH] make windows named pipes the default (on windows) This patch makes Windows Named Pipes the default IPC implementation on Windows. It also adds JUnit tests for Windows named pipes IPC. Reviewed-by: sgehwolf Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-March/022315.html diff -r 3e0b81d9b291 -r 2885a4a290d0 agent/ipc/server/src/main/java/com/redhat/thermostat/agent/ipc/server/internal/IPCConfigurationWriter.java --- a/agent/ipc/server/src/main/java/com/redhat/thermostat/agent/ipc/server/internal/IPCConfigurationWriter.java Mon Mar 06 11:11:51 2017 -0500 +++ b/agent/ipc/server/src/main/java/com/redhat/thermostat/agent/ipc/server/internal/IPCConfigurationWriter.java Tue Mar 07 09:44:06 2017 -0500 @@ -96,7 +96,7 @@ Properties props = helper.createProperties(); - props.setProperty(PROP_IPC_TYPE, OS.IS_UNIX ? IPCType.UNIX_SOCKET.getConfigValue() : IPCType.TCP_SOCKET.getConfigValue()); + props.setProperty(PROP_IPC_TYPE, OS.IS_UNIX ? IPCType.UNIX_SOCKET.getConfigValue() : IPCType.WINDOWS_NAMED_PIPES.getConfigValue()); // unix socket will work without configuration (creates sockets in tmp directory // but tcpsocket always needs ports predefined (in the future, should support service discovery) diff -r 3e0b81d9b291 -r 2885a4a290d0 agent/ipc/windows-named-pipes/common/Makefile --- a/agent/ipc/windows-named-pipes/common/Makefile Mon Mar 06 11:11:51 2017 -0500 +++ b/agent/ipc/windows-named-pipes/common/Makefile Tue Mar 07 09:44:06 2017 -0500 @@ -12,7 +12,12 @@ INCLUDE = -I $(TARGET_DIR) -I "$(JAVA_HOME)/include/" -I "$(JAVA_HOME)/include/$(JNI_PLATFORM)" +ifeq ($(JNI_PLATFORM),win32) WINHELPER_SOURCES = src/main/native/WinPipesNativeHelper.c +else +WINHELPER_SOURCES = src/main/native/WinPipesNativeHelperStub.c +endif + WINHELPER_TARGET = $(TARGET_DIR)/WinPipesNativeHelper.c WINHELPER_OBJECTS = $(WINHELPER_TARGET:.c=.o) WINHELPER_EXECUTABLE = $(SO_PREFIX)WinPipesNativeWrapper$(SO_SUFFIX) diff -r 3e0b81d9b291 -r 2885a4a290d0 agent/ipc/windows-named-pipes/common/pom.xml --- a/agent/ipc/windows-named-pipes/common/pom.xml Mon Mar 06 11:11:51 2017 -0500 +++ b/agent/ipc/windows-named-pipes/common/pom.xml Tue Mar 07 09:44:06 2017 -0500 @@ -78,35 +78,6 @@ .dll - - - - - org.codehaus.mojo - exec-maven-plugin - - - compile - - exec - - - - - make - - all - CC=${c.compiler} - SO_PREFIX=${sharedlib.prefix} - SO_SUFFIX=${sharedlib.suffix} - EXTRA_CFLAGS=${cflags} - JNI_PLATFORM=${jni.platform} - PLATFORM_LIBS=${platform.libs} - - - - - @@ -153,12 +124,43 @@ + + + + org.codehaus.mojo + exec-maven-plugin + + + compile + + exec + + + + + make + + all + CC=${c.compiler} + SO_PREFIX=${sharedlib.prefix} + SO_SUFFIX=${sharedlib.suffix} + EXTRA_CFLAGS=${cflags} + JNI_PLATFORM=${jni.platform} + PLATFORM_LIBS=${platform.libs} + + + + org.apache.maven.plugins maven-surefire-plugin - + + + ${project.build.directory} + +