service activation by getRemoteObject not working

Matthew Johnson dbus at matthew.ath.cx
Thu Apr 17 09:27:40 PDT 2008


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

-- 
www.matthew.ath.cx
D-Bus Java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080417/90e453ee/attachment-0001.pgp 


More information about the dbus mailing list