Re: Problem with net.jxta.ext.config.Configurator

James Todd <[email protected]> Mon, 29 Aug 2005 00:11:35 -0700
Newsgroups gmane.comp.java.jxta.user
Message-ID <[email protected]>
Hi Marco -

  I don't think you will want to "re-create" a JXTA configuration each 
time your application starts
  up. Have you considered AbstactConfigurator? With this class, your 
"create configuration" impl
  will be invoked only when needed and you can, optionally, get a 
callback each time the platform
  starts up, so you can tune the configuration as applicable.

  see:

    http://wiki.java.net/bin/view/Jxta/ExtConfig

    search for AbstractConfigurator

    - and -

    see AbstractConfigurator code in the example code listed in the 
resource section

  hth,

- james

--

James Todd :: blogs.sun.com/gonzo | weblogs.java.net/blog/gonzo

MyJXTA :: use it - learn it - do it

Java == platform independence
XML  == application independence
JXTA == network independence

Secure End-to-End Computing 



Marco Marconi wrote:

>I'm using net.jxta.ext.config.Configurator to auto-configure a jxta
>peer, in order to not input peer name, pass tcp port every time.
>I've added the following code before PeerGroupFactory.newNetPeerGroup():
>
>onfigurator conf = new Configurator(name, password);
>try {
> conf.save(new File(".jxta", "PlatformConfig"));
>}
>catch(Exception e) {
> e.printStackTrace();
> System.exit(1);    
>} 
>
>The problem is that the discovery service starts behaving in a wierd way.
>My peers don't find each other advertisements, or, after have found a
>pipe advertisement in the cache, a peer isn't be able to connect to the
>pipe. any hint?
>
>thank you
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>
>  
>