title: Easy way to start a standalone JNDI server (and register some resources)
body: <p>For testing purposes, I'm looking for a simple way to start a <em>standalone</em> JNDI server, and bind my javax.sql.DataSource to <code>"java:/comp/env/jdbc/mydatasource"</code> programmatically.</p>
  
  <p>The server should bind itself to some URL, for example: "java.naming.provider.url=jnp://localhost:1099" (doesn't have to be JNP), so that I can look up my datasource from another process. I don't care about which JNDI server implementation I'll have to use (but I don't want to start a full-blown JavaEE server).</p>
  
  <p>This should be so easy, but to my surprise, I couldn't find any (working) tutorial.</p>