service activation by getRemoteObject not working

Olaf Brandt obcsystems at t-online.de
Thu Apr 17 09:39:27 PDT 2008


Hi,

the service is implemented in Java as well.
I'm at home now and can not state the exact Exception, but
the text is like "/MyObject is not an Object provided by this service"

I made the connection to the bus in the static block of the class.
Then there are done some other things before aquiring the wellknown 
busname and exporting the object.
Maybe it is better to connect to the bus right before going to export 
the object ?

I will try tomorrow and let you hear about the results.

Olaf

Matthew Johnson schrieb:
> On Thu Apr 17 17:56, Olaf Brandt wrote:
>   
>> I'm trying to use DBus-Java on SuSE Linux Enterprise Server 10.
>> I'm gone use DBus to start other services.
>>
>> As mentioned in the Java-Doc of getRemoteObject the service should start,
>> if the busname requested can not be found on the bus.
>> This doesn't work. It starts not until I call a method on the 
>> Proxyobject I got.
>>     
>
> It is correct that it should not start until you call a method. Possibly
> the docs are badly worded, it's meant to read as "the resulting proxy
> will auto start the service...".
>
>   
>> But then this method call throws an Exception, because the Object is not 
>> (in this moment) exported.
>> If I call a second time, everything is fine, the object can be found and 
>> the methodcall returns normally.
>>     
>
> This is strange. Which exception do you get and what is the service
> implemented in. The method call won't be delivered until that process
> connects to the bus and hence shouldn't return an exception until then.
> It's possible there's a race condition where the message is delivered to
> the service between connection and exporting the object. I'm not sure
> how people normally cope with that?
>
>   
>> The dbus-daemon -version shows 0.6. Maybe the service activation is not 
>> working well in this relaese ?
>>     
>
> It _should_ be fine, but that is quite an old version. If you could try
> it with version 1.something that would be better, although I'd be
> surprised if it made a difference.
>
> Matt
>
>   

-- 
Olaf Brandt
Computer + Systeme
Alte Dorfstrasse 9
32699 Extertal-Almena
Steuernummer: 329/5009/1085
Umsatzsteuer-ID: DE184118443
http://www.obcsystems.de



More information about the dbus mailing list