Copy the above lines (the 'Resource' section) and paste it to your Confluence's server.xml file (located at <confluence_install>/conf/server.xml), under the Context path. This will then expose the value of the name attribute as the JNDI resource locator.
Copy the JNDI name from the name parameter. In this example, the datasource location is: java:comp/env/jdbc/JiraDS