Connecting to a remote openoffice server

557 views
Skip to first unread message

Asiri Rathnayake

unread,
May 15, 2009, 3:36:46 AM5/15/09
to JODConverter
Hi Mirko and all,

I know that this topic has been discussed before but we have a burning
requirement to be able to share a remote openoffice server between
multiple jodconverter clients. Currently the openoffice server must be
located on the same machine as the jodconverter library itself.

I'm willing to work on adding this functionality into jodconverter and
I wanted to ask you all (specially mirko) about what it would take to
add this functionality (if it is possible to implement).

I had a look at OfficeConnectionMode / OfficeConnection classes and it
seems pretty straightforward to connect to a remote openoffice server
(if I understood correctly). But still, jodconverte API seems to be
working with File objects instead of streams, this might also need to
be changed if we are to connect to a remote server.

Anyway, please let me know if this can be achieved (i'm willing to
contribute towards implementing it) and any useful pointers.

Thanks a lot.

- Asiri

Mirko Nasato

unread,
May 15, 2009, 7:52:56 AM5/15/09
to jodcon...@googlegroups.com
Hi Asiri,

2009/5/15 Asiri Rathnayake <asiri.ra...@gmail.com>:


>
> I know that this topic has been discussed before but we have a burning
> requirement to be able to share a remote openoffice server between
> multiple jodconverter clients. Currently the openoffice server must be
> located on the same machine as the jodconverter library itself.
>

If OOo is on another machine, then you loose all the benefits
introduced in JODConverter 3.0: restarting OOo if it crashes, aborting
conversions that exceed a timeout, etc. Additionally, sharing the same
OOo instance between different clients is likely to cause OOo to
crash, because it doesn't properly support multi-threading
(http://wiki.services.openoffice.org/wiki/Effort/Revise_OOo_Multi-Threading).

I strongly feel (after a few years maintaining this project and seeing
what problems users encountered in v2.x) that the best way to use OOo
on another machine is the "web service" approach
(http://www.artofsolving.com/node/15) that I plan to reintroduce in
improved fashion in JODConverter 3.0.

In fact, I would like to make the web service the recommended way to
use JODConverter.

> I'm willing to work on adding this functionality into jodconverter and
> I wanted to ask you all (specially mirko) about what it would take to
> add this functionality (if it is possible to implement).
>

It would be fairly easy to re-add this functionality, but I'll take
some persuading to do that. I don't want to encourage what I consider
a bad practice that only results in more users asking for help because
they have problems.

> I had a look at OfficeConnectionMode / OfficeConnection classes and it
> seems pretty straightforward to connect to a remote openoffice server
> (if I understood correctly). But still, jodconverte API seems to be
> working with File objects instead of streams, this might also need to
> be changed if we are to connect to a remote server.
>
> Anyway, please let me know if this can be achieved (i'm willing to
> contribute towards implementing it) and any useful pointers.
>

This functionality is available in JODConverter 2.x. So if you really
really have to adopt this approach right now, the easiest way is to
use the old version. There's a StreamOpenOfficeDocumentConverter that
passes data streams instead of file urls to OOo. (It will also buffer
your entire input document in memory before sending it to OOo though -
that's another downside to this approach.)

But, as you may have noticed, I don't recommend it. ;-)

Cheers

Mirko

Asiri Rathnayake

unread,
May 15, 2009, 8:14:04 AM5/15/09
to jodcon...@googlegroups.com
Hi Mirko,

Thanks a lot for your quick reply :)

I have one more question,

This functionality is available in JODConverter 2.x. So if you really
really have to adopt this approach right now, the easiest way is to
use the old version. There's a StreamOpenOfficeDocumentConverter that
passes data streams instead of file urls to OOo. (It will also buffer
your entire input document in memory before sending it to OOo though -
that's another downside to this approach.)


With StreamOpenOfficeDocumentConver is it possible to handle file conversions that result in multiple output files (like .doc->html)? According to it's API I think this is not supported, may be the other artefacts resulting in the document conversion is lost?

Thanks.

- Asiri

Mirko Nasato

unread,
May 15, 2009, 8:17:28 AM5/15/09
to jodcon...@googlegroups.com
Hi Asiri,

2009/5/15 Asiri Rathnayake <asiri.ra...@gmail.com>:
>


> With StreamOpenOfficeDocumentConver is it possible to handle file
> conversions that result in multiple output files (like .doc->html)?
>

Nope, that's yet another downside to that approach.

Cheers

Mirko

Reply all
Reply to author
Forward
0 new messages