*/
public class Util {
static String[] getObjectNames(Collection refs) {
ArrayList names = new ArrayList(refs.size());
for (Iterator i = refs.iterator(); i.hasNext();) {
J2EEManagedObject managedObject = (J2EEManagedObject) i.next();
try {
names.add(managedObject.getobjectName());
} catch (IllegalStateException e) {
// ignore - means the proxy went offline whilst we were iterating
}
}
return (String[]) names.toArray(new String[names.size()]);