Using pipe connection instead socket connection

145 views
Skip to first unread message

Zhivko

unread,
Jul 23, 2014, 2:25:35 AM7/23/14
to jodcon...@googlegroups.com
it is stated that:
"
Named pipes have the advantage of not taking up TCP ports (with their potential security implications), and they are marginally faster. However they require a native library to be loaded by the JVM, and this means having to set the java.library.path system property. That's why it's not the default.
"

I just used pipes and can confirm that they work more smooth than using socket configuration ie.
using OfficeConnectionProtocol.PIPE instead OfficeConnectionProtocol.SOCKET

I was getting exit code 134 od soffice.bin previously (while having OfficeConnectionProtocol.SOCKET) - but now it looks like that solved exit code 134 error.

There is nice blog in http://blog.cedarsoft.com/2010/11/setting-java-library-path-programmatically/ about how to set java library path programatically.
What they did is following:
System.setProperty( "java.library.path", "/path/to/libs" );
 
Field fieldSysPath = ClassLoader.class.getDeclaredField( "sys_paths" );
fieldSysPath.setAccessible( true );
fieldSysPath.set( null, null );

I just tried that and can confirm it works on centos 6.5 and ubuntu 14.01, on both using  java-1.7.0-openjdk-1.7.0.55.x86_64.

maybe somebody could modify jodconverter to use PIPE instead SOCKET while connecting to openoffice.
Reply all
Reply to author
Forward
0 new messages