This seems like such an easy question, but I haven't been able to do it yet.
I have ejb application I am testing using embedded openejb. One of my ejb's
has this in its ejb-jar.xml
<resource-env-ref>
<resource-env-ref-name>configURL</resource-env-ref-name>
<resource-env-ref-type>java.net.URL</resource-env-ref-type>
</resource-env-ref>
I need to bind a URL into the global JNDI namespace. I can do it when I am
testing the ejb itself using the env-properties.properties, but when I am
pulling in the ear as a .jar file into my integration tests, I can't seem to
get the env-properties to work. So I figured I would just inject directly into
the InitialContext using .bind, but that didn't work because I believe the
injection had already taken place and it couldn't find the global jndi entry.
How do you bind objects (other than EJB's, Resources) to global JNDI so that
they can be picked up later for injection. This seems simple, I must be
missing something. Everything I try keeps giving me "warning Injection data
not found in JNDI context: ...."
David