Hello; I'd like to set up a data source in my embedded OpenEJB container.
Here's my code so far, which results in nothing being bound into the JNDI
tree:
final Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
org.apache.openejb.client.LocalInitialContextFactory.class.getName());
properties.setProperty("jdbc/test", "new://Resource?type=DataSource");
properties.setProperty("jdbc/test.JdbcDriver", "org.h2.Driver");
properties.setProperty("jdbc/test.JdbcUrl",
"jdbc:h2:mem:test;DB_CLOSE_DELAY=-1");
properties.setProperty("jdbc/test.Username", "");
properties.setProperty("jdbc/test.Password", "");
properties.put("jdbc/test.DefaultAutoCommit", Boolean.valueOf(false));
this.context = new InitialContext(properties);
Any ideas? The context is empty. I got this recipe from the documentation
on the website.
Best,
Laird