I am trying to replicate the resource-ref
attribute of web.xml
in my spring web apps WebApplicationInitializer
to configure JNDI.
How would I do this:
<resource-ref>
<description>Connection Pool</description>
<res-ref-name>jdbc/LocalCheddar</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
in java config rather than xml?