All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.undertow.js.providers.jndi.JNDIInjectionProvider Maven / Gradle / Ivy

package io.undertow.js.providers.jndi;

import io.undertow.js.InjectionProvider;

import javax.naming.InitialContext;
import javax.naming.NamingException;

public class JNDIInjectionProvider implements InjectionProvider {

    @Override
    public Object getObject(String name) {
        try {
            return new InitialContext().lookup(name);
        } catch (NamingException e) {
            throw new RuntimeException(e);
        }
    }

    @Override
    public String getPrefix() {
        return "jndi";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy