List Info

Thread: Re: XBridgeFactory#createBridge()




Re: XBridgeFactory#createBridge()
user name
2007-06-26 02:03:53
Mirko Nasato wrote:
> Hi,
> 
> The documentation
> 
>  
> http://api.openoffice.org/docs/
common/ref/com/sun/star/bridge/XBridgeFactory.html
> 
> says about the first arg to createBridge()
> 
> --*
> Parameter sName*
> 
>     The name of the bridge. This allows other
components to reuse an
>     already created bridge (using getBridge).
> 
>     If empty, an anonymous bridge is created, which
cannot be retrieved
>     with getBridge(). No BridgeExistsException can be
thrown in this case.
> 
> --
> 
> However I do get a BridgeExistsException despite
passing "" as the sName.
> 
> Looking at the code (BridgeFactory.java)
> 
>                if(sName == null || sName.length() ==
0)
>                         sName = sProtocol +
":" +
> aConnection.getDescription();
> 
> so if sName is empty it just creates one; I see nothing
resembling the
> "anonymous bridge" mentioned by the
documentation?

Known issue <http://www.openoffice.org/issues/show_bug.cgi?id=5132
3>. 
Feel free to lobby me to fix that sooner than "OOo
Later."  ;)

-Stephan

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: XBridgeFactory#createBridge()
user name
2007-06-26 04:19:38
Stephan Bergmann wrote:
> Mirko Nasato wrote:
>> The documentation
>>  
>> http://api.openoffice.org/docs/
common/ref/com/sun/star/bridge/XBridgeFactory.html
>>
>>
>> says about the first arg to createBridge()
>>
>> --*
>> Parameter sName*
>>
>>     The name of the bridge. This allows other
components to reuse an
>>     already created bridge (using getBridge).
>>
>>     If empty, an anonymous bridge is created, which
cannot be retrieved
>>     with getBridge(). No BridgeExistsException can
be thrown in this
>> case.
>>
>> -- 
>>
>> However I do get a BridgeExistsException despite
passing "" as the
>> sName.
>>
>> Looking at the code (BridgeFactory.java)
>>
>>                if(sName == null || sName.length()
== 0)
>>                         sName = sProtocol +
":" +
>> aConnection.getDescription();
>>
>> so if sName is empty it just creates one; I see
nothing resembling the
>> "anonymous bridge" mentioned by the
documentation?
>
> Known issue <http://www.openoffice.org/issues/show_bug.cgi?id=5132
3>.
> Feel free to lobby me to fix that sooner than "OOo
Later."  ;)
>
Thanks, voted for the issue.

However I was more interested in getting my code to work;
trying to
reconnect to OOo: if I use createBridge() I get a
BridgeExistsException,
if I use getBridge() I get a DisposedException (the old
bridge seem to
take a while before being removed from the list of
bridges).

So I had to make sure I use a unique sName each time.

Kind regards

Mirko

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )