Search in sources :

Example 1 with ObjectFactoryBuilder

use of org.jboss.as.naming.context.ObjectFactoryBuilder in project wildfly by wildfly.

the class NamingContext method getObjectInstance.

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 == null ? null : objectFactory.getObjectInstance(object, name, this, environment);
    } catch (NamingException e) {
        throw e;
    } catch (Throwable t) {
        throw NamingLogger.ROOT_LOGGER.cannotDeferenceObject(t);
    }
}
Also used : ObjectFactory(javax.naming.spi.ObjectFactory) ObjectFactoryBuilder(org.jboss.as.naming.context.ObjectFactoryBuilder) NamingException(javax.naming.NamingException)

Aggregations

NamingException (javax.naming.NamingException)1 ObjectFactory (javax.naming.spi.ObjectFactory)1 ObjectFactoryBuilder (org.jboss.as.naming.context.ObjectFactoryBuilder)1