Confused aboud create-jdbc-resource: can I use Java EE 6 JNDI namespaces?
The documentation for creating JDBC resources (
http://docs.oracle.com/cd/E26576_01/doc.312/e24928/jdbc.htm#ggnda) says (in
Because all JNDI names are in the java:comp/env subcontext, when specifying
> the JNDI name of a JDBC resource in the Administration Console, use only
> the jdbc/name format.
But I would like to create a JDBC resource that I may subsequently look up
using the following JDBC name (which is to my knowledge Java EE
6-compliant, according to section EE.5.2.2, and is *not* in the
java:comp/env subcontext but is instead global to the instance):
If I create this JDBC resource by hand-editing the domain.xml (boo, I
know), everything works fine:
(In this case testDatabaseDataSourceName is a System property that resolves
to "java:global/jdbc/H2Test", and the referenced connection pool has
already been created.)
If I create this JDBC resource (or try to) using create-jdbc-resource,
passing it "java:global/jdbc/H2Test", the command fails saying that JNDI
names cannot have ":" in them.
But if I do create-jdbc-resource and pass only jdbc/H2Test, then as I
understand it I'm really creating java:comp/env/jdbc/H2Test.
In case it matters, I'm creating a global data source for use during
Any enlightenment greatly appreciated.