I have an oracle database on a server that tomcat is connecting to.
So I have configured in server.xml :
<Resource auth="Container" driverClassName="oracle.jdbc.OracleDriver" maxWait="-1" name="jdbc/test" password="test" type="javax.sql.DataSource" url="jdbc:oracle:thin:@test:1111:testdb" username="test"/>
tnsnames.ora is locally located on my computer, but I am wondering how is it being registered by tomcat ? I do not see anyrhing in the tomcat xml config files which points to tnsnames.ora
The tnsnames.ora file is not consulted at all because you are using the thin driver. If you wanted it to utilize it, you would need to switch to the Oracle OCI driver. You are specifying the host:port:SID already in your connection String. Tomcat does not need the tnsnames file when you do this.