Hi Chris,

thanks for the explanations. I just completed a first dirty test and
it is actually working fine. I believe I did something wrong on my
first trial. I did put the distributable="true" attribute in the
Context element of my context file in
$CATALINA_BASE/conf/[[enginename]/[hostname]/mywebapp.xml instead of
adding the empty element <distributable/> in
$CATALINA_BASE/webapps/mywebapp/WEB-INF/web.xml.

It seems the former is not working, at least with Tomcat 8.0.32
-----------------
Daniel Savard


2016-03-08 15:08 GMT-05:00 Christopher Schultz <ch...@christopherschultz.net>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Daniel,
>
> On 3/8/16 2:27 PM, Daniel Savard wrote:
>> I wonder how you handle a pool of connections (not necessarily to
>> a database, think about something generic) in a clustered
>> environement.
>
> Generally, there is nothing to be done, here. Each node is considered
> completely separate with the exception of trading HttpSession informatio
> n.
>
>> I defined a pool of connections in my application context and I
>> did put it in the context with the setAttribute() method. Since
>> each instance is doing this, what will happen when an instance is
>> shutdown?
>
> I believe that no context-scoped data is sent between cluster nodes,
> so ... nothing will happen.
>
>> These connections depend on the IP/protocol/port on both sides.
>> So, since the instance is down, one party no longer exists. What
>> is happening if a take over instance receives an incoming request
>> which refers to one of these connections?
>>
>> Do I have to handle this in my code? Do I have to reinitialize the
>> connection pool if such an event happen?
>
> If your application maintains its own connection pool, then you should
> create it with each webapp start and destroy it with each webapp stop.
>
> I don't think there are any cluster-related issues, here.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlbfMTIACgkQ9CaO5/Lv0PCL5gCguI2eODlB+8Brz9gpjJZGGzpM
> jD4An1Nag5xcNN+2vXKq7xpw6H8Gdhg/
> =Gx0w
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to