}
}
private Object getObjectInstance(final Object object, final Name name, final Hashtable<?, ?> environment) throws NamingException {
try {
final ObjectFactoryBuilder factoryBuilder = ObjectFactoryBuilder.INSTANCE;
final ObjectFactory objectFactory = factoryBuilder.createObjectFactory(object, environment);
return objectFactory.getObjectInstance(object, name, this, environment);
} catch(NamingException e) {
throw e;
} catch(Throwable t) {
throw namingException("Could not dereference object", t);