Hi!
Thank you, this helped me a lot. The problem was this:
2008/4/22 David Blevins <[EMAIL PROTECTED]>:
> Technically, we'll look for a Resource with id "jdbc/Orange" first, but
> not finding that we'll scrape off the prefix and look for a Resource with
> "Orange" as the id. With the above ref you should be able to look up the
> datasource in the bean that declared it as follows:
>
> InitialContext context = new InitialContext();
> DataSource dataSource = (DataSource)
> context.lookup("java:comp/env/jdbc/Orange");
>
I just looked in the wrong context. In my test servlet however, I found the
home object of my EJB by asking for:
Properties p = *new* Properties();
p.put("java.naming.factory.initial",
"org.openejb.client.RemoteInitialContextFactory");
javax.naming.InitialContext ctx = *new* javax.naming.InitialContext(p);
Object obj = ctx.lookup("/MyRemoteHome");
No java:comp/env here! This works on the servlet side to find the bean, but
not for the bean itself to find the data source.
Thanks again,
Alexander