Hi Juan,

Juan Heyns wrote:
I am developing a Java application that needs to convert MS Word
documents to PDF and SXW (xml).
This application will run as a service and at times may be heavily
loaded, so reliability is required. The application is running as a
windows service by means of the Java Service Wrapper.

I initially implemented the application to run as two separate
instances for the PDF and the SXW conversions. I am not sure if the UNO
handles concurrency so well. Maybe someone can comment on this.

mmh, UNO in general should be thread safe but in the office concurrency is a problem. But we are working on improvements. Currently the best way would be to implement your own dipspatcher where you serialize your requests. Only one request per office at the same time. You can work with a pool of 2,3 or more office instances in parallel.


I then tested the application with about 1500 documents. It seems that
soffice process at some stage is bound to hang. The process goes into a
99% CPU utilisation and never returns. It is not always on the same
method, but two methods regularly give this problem:
loadComponentFromURL and bootstrap.
the bootstrap functions should be called only once. When you work with a office pool you will work with several contexts from the different office instances.


The main difference between my implementation and the implementation in
DocumentConverter.java sample is that I load the RemoteContext every
time a document is converted. It seems that the DocumentConverter.java

That is not necessary, you will get always the same context, you should reuse it.

Juergen

is slightly more reliable.
Any Comments.
Juan Heyns



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to