-
1. Re: Getting wrong database connection
mickjordan Aug 24, 2001 2:08 PM (in response to mickjordan)So, I'll answer my own question. I had the <resource-ref> outside the tag in the jboss.xml file. This wasn't being checked during XML parsing because I hadn't referenced the DTD.
It also turned out to be important to have the java:/ in:
<res-ref-name>jdbc/AccountDB</res-ref-name>
<jndi-name>java:/OracleDB</jndi-name>
Leaving java:/ out did not bind the name but at least I got an error when I tried to look it up.
The reason I got the Hypersonic driver initially is presumably because of the following default behavior which is specified in the jboss.dtd file:
The mapping between the "xml name" and the "runtime jndi name" is given in
a resource-manager section. If not, and if the datasource is of type
javax.sql.DataSource, jboss will look for a javax.sql.DataSource in the jndi
tree.
Mick