org.infinispan.server.context.ServerInitialContextFactory Maven / Gradle / Ivy
package org.infinispan.server.context;
import java.util.Hashtable;
import java.util.concurrent.ConcurrentMap;
import javax.naming.Context;
import javax.naming.spi.InitialContextFactory;
/**
* @author Tristan Tarrant <[email protected]>
* @since 11.0
**/
public class ServerInitialContextFactory implements InitialContextFactory {
private final ConcurrentMap namedObjects;
public ServerInitialContextFactory(ConcurrentMap namedObjects) {
this.namedObjects = namedObjects;
}
@Override
public Context getInitialContext(Hashtable, ?> environment) {
return new ServerInitialContext(namedObjects);
}
}