On 02/11/2021 20:47, Jerry Malcolm wrote:
I am adding a redis implementation  (jedis) to my application.  I have a jedis implementation class that holds the connection pool and interfaces with jedis.  That class needs to be instantiated once per host and then referenced from that point on by all of the webapps in the host.  Is there an 'architected/correct' way to set this up?

I'd suggest configuring it as a global JNDI resource [1] and then using resource links to make it available to the web applications that need it. If every web application needs it, you can add the resource link to $CATALINA_BASE/conf/context.xml and then will add the link to every web application deployed on the Tomcat instance.

Mark


[1] http://tomcat.apache.org/tomcat-9.0-doc/jndi-resources-howto.html#Global_configuration

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to