Tomcat - Comparison of the datasource for common databasesUntil now, we have seen how the datasource is confi gured on different databases. Let's quickly compare and fi nd out what are the different syntaxes for each database:
<Resource name="jdbc/tomcat7" auth="Container"
In the previous fi gure, we have defi ned each driverClassName, port, and JDBC
driver for each database and tabulated to conclude that if you know the details for
connectivity with the database, you can confi gure any new database very easily.type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://127.0.0.1:5432/tomcat7" username="tomcat7" password="tomcat" maxActive="20" maxIdle="10" maxWait="-1"/>
Every vendor has a predefi ned set of libraries through which
you can connect to its database. If you need to connect to any
other database, which is not mentioned here, then you can
visit the vendor websites for support information.
|