{
obj = ((MarshalledValuePair) obj).get();
}
catch (ClassNotFoundException e)
{
NamingException ex = new CommunicationException();
ex.setRootCause(e);
throw ex;
}
}
else if (obj instanceof MarshalledObject)
{
try
{
obj = ((MarshalledObject) obj).get();
}
catch (ClassNotFoundException e)
{
NamingException ex = new CommunicationException();
ex.setRootCause(e);
throw ex;
}
}
realBindings.add(new Binding(binding.getName(), binding.getClassName(), obj));
}
// Return transformed list of bindings
return new NamingEnumerationImpl(realBindings);
}
catch (CannotProceedException cpe)
{
cpe.setEnvironment(refEnv);
Context cctx = NamingManager.getContinuationContext(cpe);
return cctx.listBindings(cpe.getRemainingName());
}
catch (IOException e)
{
naming = null;
removeServer(refEnv);
NamingException ex = new CommunicationException();
ex.setRootCause(e);
throw ex;
}
}