Using lookupService()
Daniel Evers <[email protected]> Tue, 19 Dec 2006 18:04:21 +0100
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! I'm trying to find a service that I advertised on another peer, using PeerGroup.lookupService(). Since that doesn't work, I have some questions: 1. I like to publish the advertisements inside a new group. All examples I found (mostly in the book by Brendon J. Wilson) use the net peer group's discovery service to publish the advertisements, not the group they create. Shouldn't they/I use newgroup.getDiscoveryService()? 2. I can't find the service implementation. I create the class adv, spec adv and impl adv for the service and according to the examples I've seen, only the class and spec advs are published. The implementation adv is added to the group's parameters (using StdPeerGroupParamAdv etc.). Since I cannot find this advertisement, shouldn't it be published along with the others? 3. Something strange: I have 2 example services doing nothing, just printing log statements on startApp(), init() and so on. I create and treat both the same, but one service is always started (without using it), i.e. I get log messages from init() and startApp(), but the other one isn't. When are init() and startApp() called? 4. [Maybe related to 3.] Do I have to call newgroup.startApp() after creating a new group to start the services? And must/should I join this group, or am I joining it automatically? Sorry to bother with so many questions, but I'm "punishing" google for quite a while now and can't find answers. Also most examples use JXTA 2.0 or 2.1, and it seems there were changes since then. thanks for all answers! greetings, Daniel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFiBuVBHvLeozhC4kRApUaAKCuho+/S8xkl17NlcXKHm97WVUdsgCfTZDb gMC3AM5sYzshHBMih4IA63A= =L4YM -----END PGP SIGNATURE-----