Keiichi Fujino <kfuj...@apache.org> wrote:

>>      /**
>> +     * Check for old versions of applications using parallel
>deployment that are
>> +     * now unused (have no active sessions) and undeploy any that
>are found.
>> +     */

<snip/>

>> +                if (context != null) {
>> +                    Manager manager = context.getManager();
>> +                    if (manager != null &&
>manager.getActiveSessions() == 0) {
>
>manager.getActiveSessions() returns the various numbers of sessions
>according to the kind of Manager.
>
>1.
>In BackupManager, manager.getActiveSessions() returns the number of a
>primary and backup sessions.
>A proxy session is not contained.
>Thus manager only with a proxy session will be deleted.
>(e.g. manager which newly joined in the cluster has only a proxy
>session.)
>It is necessary to call DistributedManager#getActiveSessionsFull()
>instead of manager.getActiveSessions().
>
>2.
>In PersistentManage, it may be necessary to take into consideration
>also about the session saved in Store.
>It should be deleted only when both manager.getActiveSessions() and
>Store#getSize are 0.
>
>Although it is possible to add these two cases,
>It seems that it is better to define method which checks number of
>sessions in a Manager/ManagerBase.

I agree that this does need to be addressed although I prefer a slightly 
different approach.

If DistributedManager is added to PersistentManagerBase then that will have 
several advantages:
- sessions in the store will be reported as proxy sessions in the Manager 
application (currently they are completely ignored)
- the auto-undeploy code can check for an instance of DistributedManager and 
use getActiveSessionsFull() in that case.

The Javadoc for DistributedManager will need some small tweaks to update it to 
the slightly wider use but this use is in keeping with what I had in mind when 
I introduced DistributedManager.

Mark

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

Reply via email to