The org.jnp.interfaces.LocalOnlyContextFactory has this ObjectFactory implementation:
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception { Context ctx = getInitialContext(environment); Reference ref = (Reference)obj; return ctx.lookup((String)ref.get("URL").getContent()); }
AFAIK Bill wrote it for jboss embedded.