...
- Another way (in case the JNDI context is read only, like in Tomcat) is to bind a bitronix.tm.resource.ResourceObjectFactory object, passing it a javax.naming.Reference containing a javax.naming.StringRefAddr containing the datasource's
uniqueNameasaddrTypesomewhere in your JNDI tree. Thebitronix.tm.resource.ResourceObjectFactoryclass will just return the datasource with the specifieduniqueName. This is explained more in-depth in the Tomcat Tomcat12 integration page.
- The last way is to call bitronix.tm.resource.ResourceRegistrar.get(String uniqueName). This is the least preferred method as this ties your code to BTM which you probably want to avoid.
