Hi Jinghai, I have started a separate thread with some design notes, see the thread "Ideas about OFBiz servlet filters". We can discuss this topic there.
Thanks, Jacopo On Fri, Sep 9, 2016 at 4:32 AM, Shi Jinghai <[email protected]> wrote: > I agree completely. I'll work on them this weekend. > > -----邮件原件----- > 发件人: Jacopo Cappellato [mailto:[email protected]] > 发送时间: 2016年9月8日 21:14 > 收件人: [email protected] > 主题: Re: svn commit: r1700119 [1/26] - in /ofbiz/trunk: ./ runtime/indexes/ > specialpurpose/ specialpurpose/solr/ specialpurpose/solr/conf/ > specialpurpose/solr/config/ specialpurpose/solr/entitydef/ > specialpurpose/solr/lib/ specialpurpose/solr/lib/compile/ s... > > On Tue, Sep 6, 2016 at 12:10 PM, Shi Jinghai <[email protected]> wrote: > > > Hi Jacopo, > > > > I cleaned OFBizSolrContextFilter.java and submitted in rev. 1759401. > > Please check if it's required to do a further refactoring. > > > > Kind Regards, > > > > Shi Jinghai > > > > > Thank you, Jinghai. > I still see a lot of code that is duplicated. > Also, I don't think it is a good idea to have a servlet filter that > initializes another filter within its init method: > > contextFilter = new ContextFilter(); > contextFilter.init(config); > > The initialization of filters should be left to the servlet container > (e.g. Tomcat) based on the configuration in web.xml. > > As regards the duplication of code, it affects unfortunately several other > filters in OFBiz, like SeoContextFilter, CatalogUrlSeoFilter etc... I think > that all these classes need a serious cleanup. > > I will start a separate thread to discuss this topic. > > Kind regards, > > Jacopo >
