Announcement Announcement Module
Collapse
No announcement yet.
FilterChainFactoryBean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • FilterChainFactoryBean

    I have implemented a "filter chain" factory (similar to what we have in HiveMind) and was wondering if someone else had already done something like this so that I could just use theirs (preferably accessible via Maven2). Basically, it's a factory which allows you to specify a service interface, a list of filters, and a terminus. Then, it will create a series of JDK dynamic proxies (I may use my Jakarta Commons Proxy library eventually) which makes sure all method calls on the outer proxy go through the filters and eventually terminate at the terminus bean. The filters don't have to adhere to any special interface (they can of course), so I guess you could say it supports "duck typing" in a way. They just need to provide methods which have the same signature except they've got an additional parameter tacked onto the end of the same type as the service interface (represents the "next" guy in the chain). Does anyone know of something like that already out there?

  • #2
    Is this similar to what Acegi does?
    http://www.acegisecurity.org/multipr...hainProxy.html

    Comment


    • #3
      Re: FilterChainFactoryBean

      It's somewhat similar, but they're filtering web requests. I'm actually filtering method invocations themselves. I'm doing something similar to HiveMind's PipelineFactory. The documentation there has a nice illustration of what I'm trying to achieve.

      Comment


      • #4
        Re: FilterChainFactoryBean

        If anyone is interested in this code, I can post it. I have a TestNG unit test class that gives 100% coverage. Do we just post code directly in this forum?

        Comment


        • #5
          Originally posted by jwcarman View Post
          Do we just post code directly in this forum?
          If you zip it and it is not too large (don't ask me about what's too large ), you might post it as attachment. However, when you intend to donate the code to Spring (or a subproject as Spring modules) I would consider opening an Extension request in Jira and post it there. In the latter case you might post the link to the Jira issue here as reference.

          Regards,
          Andreas

          Comment


          • #6
            I would agree with Andreas, raising it in JIRA would be a good idea. I think the ZIP file attachment limit is around 100k.

            Comment


            • #7
              Re: FilterChainFactoryBean

              See JIRA issue:

              http://opensource.atlassian.com/proj...rowse/SPR-3344

              Comment

              Working...
              X