You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Jiri Kuhn (JIRA)" <ji...@apache.org> on 2009/01/06 14:36:44 UTC

[jira] Created: (FTPSERVER-258) User's maxIdleTime doesn't work

User's maxIdleTime doesn't work
-------------------------------

                 Key: FTPSERVER-258
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-258
             Project: FtpServer
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.0-M4
            Reporter: Jiri Kuhn


Setting user's maxidletime property has no effect, only working idle time is the one provided by NioListener which is global.

The user's maxidletime is stored into ftp session as an attribute during PASS command, but nothing else happens. Idle event is completely handled by Mina and Mina has no knowledge about ftpserver's value. Mina takes the idle time from IoSessionConfig which is instantiated during NioListener construction (more precisely - during NioListener's SocketAcceptor construction). Each created session has its own copy of the config. That's my understanding and I hope it's right.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FTPSERVER-258) User's maxIdleTime doesn't work

Posted by "Jiri Kuhn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FTPSERVER-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jiri Kuhn updated FTPSERVER-258:
--------------------------------

    Attachment: idletime.patch

It makes sense. I think that my idea can be merged with yours.

Idle time is zero or positive value. All these values have defined meaning - no limit or a limit. You cannot say just to use a default value. If we permit users to have undefined idle time value (something like null) there is a clear way to use listener's one.

See attached patch (idletime.patch) for details.

Note:
Negative idle times for listeners are prohibited - see org.apache.mina.core.session.AbstractIoSessionConfig#setIdleTime(IdleStatus, int)

> User's maxIdleTime doesn't work
> -------------------------------
>
>                 Key: FTPSERVER-258
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-258
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Jiri Kuhn
>         Attachments: FtpIoSession.patch, idletime.patch
>
>
> Setting user's maxidletime property has no effect, only working idle time is the one provided by NioListener which is global.
> The user's maxidletime is stored into ftp session as an attribute during PASS command, but nothing else happens. Idle event is completely handled by Mina and Mina has no knowledge about ftpserver's value. Mina takes the idle time from IoSessionConfig which is instantiated during NioListener construction (more precisely - during NioListener's SocketAcceptor construction). Each created session has its own copy of the config. That's my understanding and I hope it's right.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FTPSERVER-258) User's maxIdleTime doesn't work

Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FTPSERVER-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niklas Gustavsson closed FTPSERVER-258.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.0-RC1
         Assignee: Niklas Gustavsson

> User's maxIdleTime doesn't work
> -------------------------------
>
>                 Key: FTPSERVER-258
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-258
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Jiri Kuhn
>            Assignee: Niklas Gustavsson
>             Fix For: 1.0.0-RC1
>
>         Attachments: FtpIoSession.patch, idletime.patch
>
>
> Setting user's maxidletime property has no effect, only working idle time is the one provided by NioListener which is global.
> The user's maxidletime is stored into ftp session as an attribute during PASS command, but nothing else happens. Idle event is completely handled by Mina and Mina has no knowledge about ftpserver's value. Mina takes the idle time from IoSessionConfig which is instantiated during NioListener construction (more precisely - during NioListener's SocketAcceptor construction). Each created session has its own copy of the config. That's my understanding and I hope it's right.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FTPSERVER-258) User's maxIdleTime doesn't work

Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661298#action_12661298 ] 

Niklas Gustavsson commented on FTPSERVER-258:
---------------------------------------------

I should point out that with "if set" I mean that if it is set to anything else than 0 (in which case the listener does not set any limits).

> User's maxIdleTime doesn't work
> -------------------------------
>
>                 Key: FTPSERVER-258
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-258
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Jiri Kuhn
>         Attachments: FtpIoSession.patch
>
>
> Setting user's maxidletime property has no effect, only working idle time is the one provided by NioListener which is global.
> The user's maxidletime is stored into ftp session as an attribute during PASS command, but nothing else happens. Idle event is completely handled by Mina and Mina has no knowledge about ftpserver's value. Mina takes the idle time from IoSessionConfig which is instantiated during NioListener construction (more precisely - during NioListener's SocketAcceptor construction). Each created session has its own copy of the config. That's my understanding and I hope it's right.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FTPSERVER-258) User's maxIdleTime doesn't work

Posted by "Jiri Kuhn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661140#action_12661140 ] 

Jiri Kuhn commented on FTPSERVER-258:
-------------------------------------

There are two sources of idle time values - one is NioListener, other BaseUser. If we imagine that user's maxidletime takes effect, user's value always wins. I propose to have special idle time value for users (let's say -1) which would say to PASS command not to update the session's value (coming from listener). 

Without it, the listener's idle time would be quite useless. The only ability will be to time out sessions without logged user.

> User's maxIdleTime doesn't work
> -------------------------------
>
>                 Key: FTPSERVER-258
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-258
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Jiri Kuhn
>         Attachments: FtpIoSession.patch
>
>
> Setting user's maxidletime property has no effect, only working idle time is the one provided by NioListener which is global.
> The user's maxidletime is stored into ftp session as an attribute during PASS command, but nothing else happens. Idle event is completely handled by Mina and Mina has no knowledge about ftpserver's value. Mina takes the idle time from IoSessionConfig which is instantiated during NioListener construction (more precisely - during NioListener's SocketAcceptor construction). Each created session has its own copy of the config. That's my understanding and I hope it's right.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FTPSERVER-258) User's maxIdleTime doesn't work

Posted by "Jiri Kuhn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FTPSERVER-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jiri Kuhn updated FTPSERVER-258:
--------------------------------

    Attachment: FtpIoSession.patch

The attached patch delegates idle time calls to wrapped IoSession.

> User's maxIdleTime doesn't work
> -------------------------------
>
>                 Key: FTPSERVER-258
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-258
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Jiri Kuhn
>         Attachments: FtpIoSession.patch
>
>
> Setting user's maxidletime property has no effect, only working idle time is the one provided by NioListener which is global.
> The user's maxidletime is stored into ftp session as an attribute during PASS command, but nothing else happens. Idle event is completely handled by Mina and Mina has no knowledge about ftpserver's value. Mina takes the idle time from IoSessionConfig which is instantiated during NioListener construction (more precisely - during NioListener's SocketAcceptor construction). Each created session has its own copy of the config. That's my understanding and I hope it's right.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FTPSERVER-258) User's maxIdleTime doesn't work

Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661277#action_12661277 ] 

Niklas Gustavsson commented on FTPSERVER-258:
---------------------------------------------

I would like the listener value (if set) to override any larger user value.  That would then enforce the maximum idle time, and the user store would enable setting any specific user to a lower value. Or, you can use the user store alone, in which case each users value would be used. What do you think?

Anyways, the patch is a good start, I'll use that and implement the solution describe above for RC1 unless anyone complains.

> User's maxIdleTime doesn't work
> -------------------------------
>
>                 Key: FTPSERVER-258
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-258
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Jiri Kuhn
>         Attachments: FtpIoSession.patch
>
>
> Setting user's maxidletime property has no effect, only working idle time is the one provided by NioListener which is global.
> The user's maxidletime is stored into ftp session as an attribute during PASS command, but nothing else happens. Idle event is completely handled by Mina and Mina has no knowledge about ftpserver's value. Mina takes the idle time from IoSessionConfig which is instantiated during NioListener construction (more precisely - during NioListener's SocketAcceptor construction). Each created session has its own copy of the config. That's my understanding and I hope it's right.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FTPSERVER-258) User's maxIdleTime doesn't work

Posted by "Jiri Kuhn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662250#action_12662250 ] 

Jiri Kuhn commented on FTPSERVER-258:
-------------------------------------

You are right, the difference is really small and your code is less complicated then mine. The issue can be closed.

> User's maxIdleTime doesn't work
> -------------------------------
>
>                 Key: FTPSERVER-258
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-258
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Jiri Kuhn
>         Attachments: FtpIoSession.patch, idletime.patch
>
>
> Setting user's maxidletime property has no effect, only working idle time is the one provided by NioListener which is global.
> The user's maxidletime is stored into ftp session as an attribute during PASS command, but nothing else happens. Idle event is completely handled by Mina and Mina has no knowledge about ftpserver's value. Mina takes the idle time from IoSessionConfig which is instantiated during NioListener construction (more precisely - during NioListener's SocketAcceptor construction). Each created session has its own copy of the config. That's my understanding and I hope it's right.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FTPSERVER-258) User's maxIdleTime doesn't work

Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FTPSERVER-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661756#action_12661756 ] 

Niklas Gustavsson commented on FTPSERVER-258:
---------------------------------------------

Wouldn't a value of 0 for the user be the same as accepting whatever is set for the listener? I wouldn't want to make this to complicated. Would you be okay with the current code in trunk? If so, I'll document it and maybe we can get that RC1 out :-)

> User's maxIdleTime doesn't work
> -------------------------------
>
>                 Key: FTPSERVER-258
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-258
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-M4
>            Reporter: Jiri Kuhn
>         Attachments: FtpIoSession.patch, idletime.patch
>
>
> Setting user's maxidletime property has no effect, only working idle time is the one provided by NioListener which is global.
> The user's maxidletime is stored into ftp session as an attribute during PASS command, but nothing else happens. Idle event is completely handled by Mina and Mina has no knowledge about ftpserver's value. Mina takes the idle time from IoSessionConfig which is instantiated during NioListener construction (more precisely - during NioListener's SocketAcceptor construction). Each created session has its own copy of the config. That's my understanding and I hope it's right.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.