I would like what is the best way to read N resources defined in tomcat server.xml file.
Currently to read a single resource:
<Resource name="jdbc/xxx"
global="jdbc/xxx"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@xxx.it:1521:orcl"
username="XXX"
password="XXXX"
maxIdle="20"
minIdle="5" />
i used this code:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
(DataSource)envCtx.loockup("nameResource")
is there a way to configure multiple Resource in the server.xml file and then read a list of them?
Sorry for the english