A Tomcat server worker thread replying to an incoming request must access at least one of several possible cloud API services (Google Cloud Storage in particular; non-modifying, that is, only performing Reads). Tomcat offers out-of-the-box pooling for JDBC and JNDI compatible DB's and services. What is the best strategy for pooling connections to multiple cloud services to be shared across worker threads?
Tomcat: Creating a connection pool for cloud API services
175 Views Asked by ChaimKut At
2
There are 2 best solutions below
0
Setop
On
Your application access API over HTTP(S). The connection pooling must be performed at HTTP Client level.
If you're using Apache HTTPClient, there are examples of usage of pool.
Related Questions in TOMCAT
- Hibernate Query Exception: Cannot create critieria on owning entity
- Using like to non-string columns in Grails
- Play Framework Unable to build entity manager factory when Working with PostGIS
- How namedparameter query blocks SQL injection
- Is it necessary to create an repository and a service for each entity?
- JPA, Hibernate can I do composite primary key which one element is foreign kay @OneToMany?
- How to convert Hibernate List to String?
- Hibernate Lazy loading not work in OneToOne relation
- Hibernate Search Faceting not working
- JPA and web app
Related Questions in CONCURRENCY
- Hibernate Query Exception: Cannot create critieria on owning entity
- Using like to non-string columns in Grails
- Play Framework Unable to build entity manager factory when Working with PostGIS
- How namedparameter query blocks SQL injection
- Is it necessary to create an repository and a service for each entity?
- JPA, Hibernate can I do composite primary key which one element is foreign kay @OneToMany?
- How to convert Hibernate List to String?
- Hibernate Lazy loading not work in OneToOne relation
- Hibernate Search Faceting not working
- JPA and web app
Related Questions in CONNECTION-POOLING
- Hibernate Query Exception: Cannot create critieria on owning entity
- Using like to non-string columns in Grails
- Play Framework Unable to build entity manager factory when Working with PostGIS
- How namedparameter query blocks SQL injection
- Is it necessary to create an repository and a service for each entity?
- JPA, Hibernate can I do composite primary key which one element is foreign kay @OneToMany?
- How to convert Hibernate List to String?
- Hibernate Lazy loading not work in OneToOne relation
- Hibernate Search Faceting not working
- JPA and web app
Related Questions in TOMCAT9
- Hibernate Query Exception: Cannot create critieria on owning entity
- Using like to non-string columns in Grails
- Play Framework Unable to build entity manager factory when Working with PostGIS
- How namedparameter query blocks SQL injection
- Is it necessary to create an repository and a service for each entity?
- JPA, Hibernate can I do composite primary key which one element is foreign kay @OneToMany?
- How to convert Hibernate List to String?
- Hibernate Lazy loading not work in OneToOne relation
- Hibernate Search Faceting not working
- JPA and web app
Related Questions in CONNECTION-POOL
- Hibernate Query Exception: Cannot create critieria on owning entity
- Using like to non-string columns in Grails
- Play Framework Unable to build entity manager factory when Working with PostGIS
- How namedparameter query blocks SQL injection
- Is it necessary to create an repository and a service for each entity?
- JPA, Hibernate can I do composite primary key which one element is foreign kay @OneToMany?
- How to convert Hibernate List to String?
- Hibernate Lazy loading not work in OneToOne relation
- Hibernate Search Faceting not working
- JPA and web app
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
As you mentioned Tomcat allows defining JDBC/JNDI resources that can be used by web applications. If there is a JDBC driver available for the service you want to use then you can use the same approach. For example, a quick search for GCS JDBC driver returns this.
For pooling, you could define HikariCP as a tomcat resource and configure it to connect to GCS using the third-party driver using the
driverClassNameproperty.Alternatively, applications can use the HTTP-based SDKs that cloud providers usually make available.