You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Kiril Raychev (JIRA)" <ji...@apache.org> on 2012/05/17 08:27:02 UTC

[jira] [Created] (THRIFT-1608) Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished

Kiril Raychev created THRIFT-1608:
-------------------------------------

             Summary: Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
                 Key: THRIFT-1608
                 URL: https://issues.apache.org/jira/browse/THRIFT-1608
             Project: Thrift
          Issue Type: Improvement
          Components: Java - Library
         Environment: any
            Reporter: Kiril Raychev
         Attachments: TExtensibleServlet.java

Servlets are generally considered ready to use after the init() method has finished. That is, they are open for configuration before that. TServlet does not follow that - it requires TProcessor and TProtocolFactory as constructor args.

I think it will be better if if you could use the ServletContext to get the necessary processor and factories. Those objects could be set in the context, or  it may just be more convenient not to supply them at the constructor.

I have attached a modified version of the TServlet, with a new name. It uses abstract methods to get the required processor and factories. I don't think it can be added cleanly to the existing TServlet, so it should be a separate class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1608) Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished

Posted by "Kiril Raychev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397426#comment-13397426 ] 

Kiril Raychev commented on THRIFT-1608:
---------------------------------------

I would like to add a test, but it's only a servlet - I'm not sure how to unit test it (there are no test for TServlet either). It does work however, as I am using it in several projects.
If there is another way to help, please tell me :)
                
> Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
> -------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1608
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1608
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>         Environment: any
>            Reporter: Kiril Raychev
>         Attachments: TExtensibleServlet.java, thrift-1608-textensibleservlet.path
>
>
> Servlets are generally considered ready to use after the init() method has finished. That is, they are open for configuration before that. TServlet does not follow that - it requires TProcessor and TProtocolFactory as constructor args.
> I think it will be better if if you could use the ServletContext to get the necessary processor and factories. Those objects could be set in the context, or  it may just be more convenient not to supply them at the constructor.
> I have attached a modified version of the TServlet, with a new name. It uses abstract methods to get the required processor and factories. I don't think it can be added cleanly to the existing TServlet, so it should be a separate class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1608) Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished

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

Kiril Raychev updated THRIFT-1608:
----------------------------------

    Attachment: thrift-1608-textensibleservlet.path
    
> Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
> -------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1608
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1608
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>         Environment: any
>            Reporter: Kiril Raychev
>         Attachments: TExtensibleServlet.java, thrift-1608-textensibleservlet.path
>
>
> Servlets are generally considered ready to use after the init() method has finished. That is, they are open for configuration before that. TServlet does not follow that - it requires TProcessor and TProtocolFactory as constructor args.
> I think it will be better if if you could use the ServletContext to get the necessary processor and factories. Those objects could be set in the context, or  it may just be more convenient not to supply them at the constructor.
> I have attached a modified version of the TServlet, with a new name. It uses abstract methods to get the required processor and factories. I don't think it can be added cleanly to the existing TServlet, so it should be a separate class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1608) Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397091#comment-13397091 ] 

Hudson commented on THRIFT-1608:
--------------------------------

Integrated in Thrift #503 (See [https://builds.apache.org/job/Thrift/503/])
    THRIFT-1608 Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
Patch: Kiril Raychev (Revision 1351848)

     Result = SUCCESS
roger : http://svn.apache.org/viewvc/?view=rev&rev=1351848
Files : 
* /thrift/trunk/lib/java/src/org/apache/thrift/server/TExtensibleServlet.java

                
> Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
> -------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1608
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1608
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>         Environment: any
>            Reporter: Kiril Raychev
>         Attachments: TExtensibleServlet.java, thrift-1608-textensibleservlet.path
>
>
> Servlets are generally considered ready to use after the init() method has finished. That is, they are open for configuration before that. TServlet does not follow that - it requires TProcessor and TProtocolFactory as constructor args.
> I think it will be better if if you could use the ServletContext to get the necessary processor and factories. Those objects could be set in the context, or  it may just be more convenient not to supply them at the constructor.
> I have attached a modified version of the TServlet, with a new name. It uses abstract methods to get the required processor and factories. I don't think it can be added cleanly to the existing TServlet, so it should be a separate class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1608) Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished

Posted by "Kiril Raychev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294981#comment-13294981 ] 

Kiril Raychev commented on THRIFT-1608:
---------------------------------------

Just reminding you about this. Please give suggestions if this is ok, and if I can make it better somehow.
                
> Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
> -------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1608
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1608
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>         Environment: any
>            Reporter: Kiril Raychev
>         Attachments: TExtensibleServlet.java, thrift-1608-textensibleservlet.path
>
>
> Servlets are generally considered ready to use after the init() method has finished. That is, they are open for configuration before that. TServlet does not follow that - it requires TProcessor and TProtocolFactory as constructor args.
> I think it will be better if if you could use the ServletContext to get the necessary processor and factories. Those objects could be set in the context, or  it may just be more convenient not to supply them at the constructor.
> I have attached a modified version of the TServlet, with a new name. It uses abstract methods to get the required processor and factories. I don't think it can be added cleanly to the existing TServlet, so it should be a separate class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1608) Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished

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

Kiril Raychev updated THRIFT-1608:
----------------------------------

    Attachment: TExtensibleServlet.java
    
> Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
> -------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1608
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1608
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>         Environment: any
>            Reporter: Kiril Raychev
>         Attachments: TExtensibleServlet.java
>
>
> Servlets are generally considered ready to use after the init() method has finished. That is, they are open for configuration before that. TServlet does not follow that - it requires TProcessor and TProtocolFactory as constructor args.
> I think it will be better if if you could use the ServletContext to get the necessary processor and factories. Those objects could be set in the context, or  it may just be more convenient not to supply them at the constructor.
> I have attached a modified version of the TServlet, with a new name. It uses abstract methods to get the required processor and factories. I don't think it can be added cleanly to the existing TServlet, so it should be a separate class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1608) Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished

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

Jake Farrell updated THRIFT-1608:
---------------------------------

    Patch Info:   (was: Patch Available)

Please see http://thrift.apache.org/docs/HowToContribute/ for submitting patches
                
> Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
> -------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1608
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1608
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>         Environment: any
>            Reporter: Kiril Raychev
>         Attachments: TExtensibleServlet.java
>
>
> Servlets are generally considered ready to use after the init() method has finished. That is, they are open for configuration before that. TServlet does not follow that - it requires TProcessor and TProtocolFactory as constructor args.
> I think it will be better if if you could use the ServletContext to get the necessary processor and factories. Those objects could be set in the context, or  it may just be more convenient not to supply them at the constructor.
> I have attached a modified version of the TServlet, with a new name. It uses abstract methods to get the required processor and factories. I don't think it can be added cleanly to the existing TServlet, so it should be a separate class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1608) Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400206#comment-13400206 ] 

Hudson commented on THRIFT-1608:
--------------------------------

Integrated in Thrift #505 (See [https://builds.apache.org/job/Thrift/505/])
    THRIFT-1608 add license header (Revision 1353313)

     Result = SUCCESS
roger : http://svn.apache.org/viewvc/?view=rev&rev=1353313
Files : 
* /thrift/trunk/lib/java/src/org/apache/thrift/server/TExtensibleServlet.java

                
> Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
> -------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1608
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1608
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>         Environment: any
>            Reporter: Kiril Raychev
>         Attachments: TExtensibleServlet.java, thrift-1608-textensibleservlet.path
>
>
> Servlets are generally considered ready to use after the init() method has finished. That is, they are open for configuration before that. TServlet does not follow that - it requires TProcessor and TProtocolFactory as constructor args.
> I think it will be better if if you could use the ServletContext to get the necessary processor and factories. Those objects could be set in the context, or  it may just be more convenient not to supply them at the constructor.
> I have attached a modified version of the TServlet, with a new name. It uses abstract methods to get the required processor and factories. I don't think it can be added cleanly to the existing TServlet, so it should be a separate class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (THRIFT-1608) Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished

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

Roger Meier resolved THRIFT-1608.
---------------------------------

    Resolution: Fixed

committed

;-r

ps: test suite enhancements are very welcome ;-)
                
> Allow servlet to be supplied TProcessor and TProtocolFactory after the init() method has finished
> -------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1608
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1608
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>         Environment: any
>            Reporter: Kiril Raychev
>         Attachments: TExtensibleServlet.java, thrift-1608-textensibleservlet.path
>
>
> Servlets are generally considered ready to use after the init() method has finished. That is, they are open for configuration before that. TServlet does not follow that - it requires TProcessor and TProtocolFactory as constructor args.
> I think it will be better if if you could use the ServletContext to get the necessary processor and factories. Those objects could be set in the context, or  it may just be more convenient not to supply them at the constructor.
> I have attached a modified version of the TServlet, with a new name. It uses abstract methods to get the required processor and factories. I don't think it can be added cleanly to the existing TServlet, so it should be a separate class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira