about activation
anlong sun
anlongsun at gmail.com
Wed Jan 24 09:17:19 PST 2007
Hello everyone:
We used dbus for a long time.She is really great!
Now we have a special request:
Application A want to call the service method in application B.
There are 2 conditions:
1. B already exists, it is easy for A, A just send dbus message.
2. B not exists. So A will launch B, and then send dbus message.
I know auto start function of activation has the similar function.
But now, I do not want to use .service file to tell dbus deamon to
start application B. It is more comfortable or maybe I have to launch
application B by myself (by application A).
I have use dbus_message_set_auto_activation (msg, TRUE);
but after A launch B, B can not get the dbus message.
I have read nearly all the mails about activation in this mail list,
but can not solve the problem.
When dbus daemon does not have the .service file, the dbus message will not
be queued if dbus daemon fail to launch application B.
But from this mail, I think the dbus message will be queued.
How can I do that : launch B application by myself instead of by dbus
daemon and still queued the message which can be gotten by B after
launched?
thanks
longsun
On Fri, 2004-10-01 at 13:10 +0200, Waldo Bastian wrote:
> How does automatic service activation work exactly? If a message for an
> unregistered service is received, the service is started if it is known,
> correct?
Only optionally, at the moment. You can send an "activate service"
message and ask that messages to the service be queued up until it's
activated iirc.
> Will the message be queued until the service has registered itself with dbus?
Yes.
> Does dbus handle messages in the meantime?
Yes, messages to other services are still handled - dbus-daemon never
blocks.
> What happens if a second message for the same (still not registered) service
> arrives?
Also queues up. A message queue is kept for the service that's pending
activation.
> Is there a way to detect that activation of the service failed?
Yeah, you should get an error reply in that case, and all the queued
messages will also get error replies.
Havoc
More information about the dbus
mailing list