bparreira17 / jodconverter

Automatically exported from code.google.com/p/jodconverter
0 stars 0 forks source link

Improve OOo process management robustness #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Sean kindly contributed some code to get the PID and kill the process using
taskkill on Windows, and provide an abstraction on top of *nix and Windows
process management so other implementations can be added.

Original issue reported on code.google.com by mirko.na...@gmail.com on 7 Sep 2008 at 2:13

GoogleCodeExporter commented 8 years ago
Attaching the code sent to me by Sean that needs to be integrated into trunk.

As later discovered by Sean, AbstractWindowsProcessService.getPID() needs to be 
fixed
because 'handle' is not the PID but a window id.

Original comment by mirko.na...@gmail.com on 7 Sep 2008 at 2:16

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 14 Sep 2008 at 11:25

GoogleCodeExporter commented 8 years ago
Sean committed his initial implementation in r40

I really like the idea. Basically before starting an OOo process we can make 
sure
that no stale OOo process with the same parameters (e.g. port number) is already
running by using ps on Unix or wmic on Windows.

But e.g. UnixProcessService.findPID() currently seems to work on Linux but not 
on OS
X or Solaris because of the differences in ps implementations, so there's a 
risk of
having to do a lot of work and testing to correctly support various 
platforms/versions.

I guess we could enable only the basic (pure Java) implementation by default, 
and
leave more robust but system-specific implementations as optional.

Original comment by mirko.na...@gmail.com on 24 Dec 2008 at 1:10

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 11 Jan 2009 at 10:41

GoogleCodeExporter commented 8 years ago
OfficeProcess now uses a ProcessManager, and the implementation can be passed 
as part
of the configuration, with the default being PureJavaProcessManager.

Available platform-specific implementations are UnixProcessManager (for Linux 
and
possibly other *nixes) and MacProcessManager.

Still need to add the Windows implementation because WMIC seems to use different
output formats on different Windows versions...

Original comment by mirko.na...@gmail.com on 29 Mar 2009 at 10:26

GoogleCodeExporter commented 8 years ago
Marking as Fixed even though it's only half-done - just so that the tracker can
display all changes in 3.0-beta-2.

Will create another issue for making a Windows implementation possible.

Original comment by mirko.na...@gmail.com on 19 Apr 2009 at 8:26

GoogleCodeExporter commented 8 years ago

Original comment by mirko.na...@gmail.com on 27 Mar 2011 at 1:21