powered by Jive Software

ServiceDiscoveryManager returning stale information?

The initial calls to ServiceDiscoveryManager are returning correct data, but when this function (shown below) is called a second time the original data is being returned. Is it cached somewhere? Any ideas?

rooms.add(roomInfo);

}

}

}

RoomInfo roomInfo = MultiUserChat.getRoomInfo(connection, hostedRoom.getJid());

for(HostedRoom hostedRoom : MultiUserChat.getHostedRooms(connection, item.getEntityID())){

if(item.getEntityID().toLowerCase().contains(“conference”)){

DiscoverItems.Item item = (DiscoverItems.Item)it.next();

while (it.hasNext()) {

Iterator it = discoItems.getItems();

DiscoverItems discoItems = discoManager.discoverItems(host);

ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection);

Collection rooms = new ArrayList();

This line is apparently the issue:

ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection);

Change to this and fresh data is returned:

ServiceDiscoveryManager discoManager = new ServiceDiscoveryManager(connection);