(Usually it’s good to drop one’s pretensions, but since all we have handy is a prefix we’ll just drop that instead…)
We are (for the moment, anyway) going to need to change our JBoss JDBC datasources so that the datasource resides in the global JNDI namespace, to be looked up under jndi-name
Blah rather than
java:Blah. The reason we need to make this change is that Bitronix doesn’t currently support the java: prefix.
I seem to remember seeing a tag that you could put in your datasource configuration file that would tell JBoss to make the datasource available from the global JNDI namespace instead of from the JVM-specific
Ah yes, the JBoss 4 Application Server Guide and the DTD both document the use-java-context element. Set that to false and it goes in the global JNDI namespace. Using the java: namespace would be preferred; The JBoss 4 Application Server Guide also says,
DataSource wrappers are not usable outside of the server VM, so they are normally bound under the java:/, which isn’t shared outside the local VM.
That’s what we’ll need to set in our production datasources so that Bitronix Transaction Manager can exactly replicate the JNDI functionality at integration test time.