this.tempDir = File.createTempFile("jnditest", null);
this.tempDir.delete();
this.tempDir.mkdir();
this.tempDir.deleteOnExit();
MysqlConnectionPoolDataSource ds;
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
this.ctx = new InitialContext(env);
assertTrue("Naming Context not created", this.ctx != null);
ds = new MysqlConnectionPoolDataSource();
ds.setUrl(dbUrl); // from BaseTestCase
ds.setDatabaseName("test");
this.ctx.bind(this.tempDir.getAbsolutePath() + "/test", ds);
}