tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis MONTEIRO <jean-louis.monte...@atosorigin.com>
Subject Re: Putting data source into local container?
Date Mon, 20 Apr 2009 17:28:06 GMT

Which openejb version do you use ?
Did you dump the JNDI content ?
Can you give us more code (from you unit test case ?) ?

Jean-Louis


ljnelson wrote:
> 
> 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
> 
> 

-- 
View this message in context: http://www.nabble.com/Putting-data-source-into-local-container--tp23138888p23141193.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message