Hello Cornelis,
Hello Andreas,
We need to restart the office from our code, but the process will
deadlock when we bootstrap while another office process is terminating.
So we need a reliable way to determine wether the office is terminated.
By the disposing call, we could know that. Is there another way to
detect that?
If you call for example XDesktop.getCurrentFrame() just after you have
terminated it, the OpenOffice process and the Java process will hang.
The following workaround seems to work, but is dirty:
if (desktop.terminate()) {
while (true) {
try {
context.getServiceManager();
} catch (DisposedException e) {
break;
}
}
} else {
// could not terminate
}
Stephan already accepted that the missing disposing() event is a bug.
On the other side even the disposing() event of XDesktop isnt a real
indicator that new office processes can be started. Those function is
missing at the moment. From my point of view those events (office
context started/terminated) must be provided by the bridge you are
using. But it might be impossible to do so ... because the UNO Service
Manager and it's context are one part of the office only. So there
exists other parts which do not synchronize her doing with the UNO
service manager.
I do not know if, how and when we can solve that issue realy.
But might be there exists a workaround ...
Because it's even not a good idea to start the office in the same way
then it's started as UI office on the desktop you should use one "user
layer" for every instance you start. Exactly those "user layer" (which
resists in you home folder) makes the trouble you found out if two
office processes are started.
Idea:
a) Use a special prepared user layer as template.
b) Copy those layer to a temp location on disc.
c) Start every new office with a parameter
"-env:UserInstallation=file:///<temp_user_layer_path>"
d) Delete those layer after the office was terminated.
That will make it possible to create a pool of running office instances
for several purposes without the need to synchronize it.
Regards,
Cornelis
Best Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]