I am attempting to use ha-jdbc with my GlassFish application and I've run into an issue that I can't seem to find an answer for. The existing application looks up a standard jdbc-resource using the JNDI name "jdbc/database1", so I created a custom-resource for ha-jdbc and gave it that same JNDI name (after removing the old jdbc-resource, of course). Unfortunately this doesn't seem to work, as the lookup always returns null. However, if I change the JNDI name to "foo/database1" (and change the application to look up that name) it works correctly.
So my question is, is it possible to have a custom-resource with a JNDI name that starts with "jdbc/"? Is there extra configuration required to make this work, or is that particular prefix reserved for GlassFish use exclusively? I would like to be able to deploy my application with or without the custom resource, so being able to use the same JNDI name for both and only changing the domain.xml (rather than my code) would be preferred.
Thanks!
[Message sent by forum member 'confusionary' (confusionary)]
http://forums.java.net/jive/thread.jspa?messageID=262480