Task: There is some Java application that needs to be deployed on a remote server. The application works with PostgreSQL. The hosting is already pre-installed Java 11, PostgreSQL 10.3 and Tomcat 9. The application needs to receive a pool of connections.
What caused me difficulties: All examples to create a Tomcat connections pool, which I managed to find, were usually the following steps sequence: Configuring the Tomcat configuration files, configuring Web.xml, receiving DataSource via JNDI . However, based on the fact that Tomcat is already pre-installed, I have some questions and misunderstandings:
- Preset Tomcat is likely to be used for completely different applications. Common sense suggests that no one will give me access to the general settings, on which the work of absolutely left applications depends.
- When configuring the Connection Pool on the Tomcat side -one of the required attributes that you want to specify this URL connection to the database. In this URL, you must specify the name of the database to which we connect. Those. It turns out that any pool of connections (a separate object of type DataSource) can only be associated with one particular database?
If I'm not mistaken in the two items above, it turns out that the configuration of the compound pool of the built-in Tomcat makes sense only if we ourselves install and configure Tomcat? And if Tomcat is already installed and configured by the admin administrator -how then to be?
p.s. I'm new to this topic.
- How to start a java script in the browser?
- java : Foreach does not work in jstl
- In Java Servlet, when SHA-256 sends a WW-AUTHENTICATE header for digest authentication, the client side will not return the resu
- java : Tomcat-Error-HTTP-STATUS-404-NOT-FOUND
- java : Why doesn't the JSTL library connect?
- Java and Tomcat Version
- java : Tomcat does not compile a JSP class
- Why when using Tomcat does not write logs using log4j2 in Java?
- java : Logger (log4j) does not write in log