Skip to main content

How to save Advertisements?

1 reply [Last post]
hristiyan_
Offline
Joined: 2010-08-08
Points: 0

Hi,

I am developing an application with JXTA. When I connect 2 Peers they exchange advertisements, but after that I can`t find the advertisements in the local cache. Are the advertisements automatically saved and how can I save them if not? Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
adamman71
Offline
Joined: 2007-01-31
Points: 0

Some core advertisements are automatically saved, such as route advertisements for example, but otherwise, you are responsible for saving your own/customized advertisements with one of the DiscoveryService.publish() methods.

If you are already using that method, make sure you are not deleting your local configuration when you (re)start your peers, since this is often performed in available examples on the net. You would also want to check the expiration values you use when calling these methods.