Stephan Many thanks for your help, your direction has helped me produce a sample that uses GUI to convert to pdf Office documents using UNO and openoffice.
I am attaching the sample and hope it would be useful for other people.
All the best
David Dankwerth
ri3k
Stephan Bergmann wrote:
> David Dankwerth wrote:
>
>> Hello
>>
>> I am playing with the FirstConnection example that comes with the SDK
>> for version 1.1.4 .
>> I have noticed that it has inside it :
>>
>> finally {
>> System.exit(0) ;
>> }
>>
>> Is there any way to avoid this and have the main exit without forcing
>> it ?
>> I intend to embed similar code in a servlet, and therefor can not
>> execute the System.exit
>
>
> The problem is that when your application uses a remote UNO bridge,
> that bridge has an internal thread that keeps running (and thus keeps
> your application up) as long as the bridge has not yet been disposed.
> Now, such a bridge can be disposed in three ways:
>
> 1 Manually by calling the UNO method dispose (see the UNO service
> com.sun.star.bridge.Bridge, which includes the UNO interface
> com.sun.star.lang.XComponent). The problem is that when you use
> UnoUrlResolver or the simple bootstrap mechanism, the bridge instance
> is not directly available to you, as those mechanisms encapsulate its
> use.
>
> 2 The bridge is disposed when the underlying connection (TCP/IP, ...)
> is closed (for example, when the application at the remote end of the
> bridge is terminated).
>
> 3 The bridge is automatically disposed once no more UNO objects are
> "mapped" over it (i.e., no more UNO objects from the local end are
> used by the remote end, or vice versa). The problem with Java is that
> if you locally use a UNO object from the remote end, it will remain
> "used" (and thus the bridge be kept up) until the (local Java object
> that is a proxy for that remote UNO) object is garbage collected by
> the local JVM, and there is no robust way to enforce garbage
> collection of specific objects. (See
> qadevOOo/runner/util/WaitUnreachable.java for some hacky solution, and
> grep the bridges/test tree for uses of it.)
>
> -Stephan
>
>> Thanks
>> David Dankwerth
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
________________________________________________________________________
This e-mail and its attachments are confidential. If you are not the intended
recipient of this e-mail message, please telephone or e-mail us immediately,
delete this message from your system and do not read, copy, distribute,
disclose or otherwise use this e-mail message and any attachments.
Although ri3k believes this e-mail and any attachments to be free of any virus
or other defect which may affect your computer, it is the responsibility of the
recipient to ensure that it is virus free and ri3k does not accept any
responsibility for any loss or damage in any way from its use.
oosample.tar.gz
Description: application/gzip
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
