new NetworkManger( ) - weird result from getPeerName( )
I'm trying to develop my own chat app using 2.5 as a means to learn jxta.
I've created a form with a login text field & a login button.
When I login in I do a:
manager = new NetworkManager(NetworkManager.ConfigMode.EDGE, nameID);
group = manager.startNetwork();
nameID being the text from the login textfield.
Later on I do a:
System.out.println("Peer name : " + group.getPeerName());
Simple & all seems fine. The first time I run the app (no .jxta dir has been created in the root dir of the app) the getPeerName() returns the nameID (eg. Pete) I used in creating the NetworkManager.
However, the second time I run the app and use a different login name (eg. Steve)
the getPeerName() returns the old user name (eg.Pete) and not the new one.
If I debug the app the the manager object created shows a member 'instanceName' to be set to Steve.
So the manager object seems to be being created as expected, but the group object returned at creation seems to be registering it as per the old name!?!?
If I delete the .jxta dir & re-run all works as expected again!
Any ideas what's happening here and or a solution?
PS. Anyone know how to include code in a 'code block' rather than have it in-lined with the text?
Message was edited by: siggyuke