3 Replies Latest reply on May 2, 2008 8:10 AM by Jeff Yu

    Filters in ESB

    Jeff Yu Master

      Hi Team,

      1. Deployment of the "jbossesb-properties.xml".
      Looked at the "Meta-data and Filters" section in the programmers Guide, it doesnt talk about the deployment of the "jbossesb-properties.xml", also, the note makes me a bit confused.

      Note: you will need to place any changes to your jbossesb-properties.xml file on each ESB instance that is deployed in your environment. This will ensure that all ESB instances can process the same meta-data.

      What does the "all ESB instance" mean here? Say, I have deployed the Trailblazer .esb, and also I have jboss.esb, jbossesb.sar deployed in my application server. Does it mean the "Jobss esb instance", instead of the ".esb" deployment.

      I think it should be the "JBoss ESB instance", as I didn't see the "jbossesb-properties.xml" in the ".esb" archive. Just think we might need to mention this a bit in the document, and also needs to describe it will affect the whole deployment, mean all the ".esb" archive the in ESB instance.

      2. Register other additional filters in the ESB.

      Right now, I know if I want to add my custom filter, I need to add the filter in the "jbossesb-properties.xml" in the "jbossesb.sar" archive, take the Trailblazer" as an example again.

      Say, my filter is "com.example.trailblazer.MointerFilter", and then I need to add it to the file in the "jbossesb.sar", this kind of making me feel that now the "jbossesb.sar" is depend on the class in the traillblazer.esb archive.

      I am looking for is there a way to define my filter in my own archive's jbossesb-properties.xml file, and then the ESB instance will pick it up automatically. I know, using this approach could make some side-effect, I mean it is a global-scope filter, it might make people hard to find all the on-going filters.

      Whats the trade-off here?

      In fact, I'd like the approach:
      I'll add my filters on the jbossesb-properties.xml in my own .esb archive, and then the infrastructure will pick it up automatically? I dont know can we do it right now (JBossESB 4.2.1 GA)?


        • 1. Re: Filters in ESB
          Mark Little Master

          The property file is for the ESB instance. If you think saying "JBossESB instance" is better then fine. Create a JIRA and we'll update the docs.

          We have no concept of per-service filters at the moment (think CORBA POI). That should come in the 5.0 release eventually. At the moment the filter approach, via the property file, seems to be sufficient for all (majority) of the use cases we have.

          As to how the filter code is loaded into the ESB deployment, it should be possible to add it to your normal classpath resolution and not have to put it within the jbossesb.sar. Do you find that is not the case? If so can you produce a stand-alone test case and we'll investigate.

          • 2. Re: Filters in ESB
            Mark Little Master

            BTW, I have implemented per-service filters but this won't be available until after ESB 4.3 goes out.

            • 3. Re: Filters in ESB
              Jeff Yu Master

              Filed a JIRA (http://jira.jboss.com/jira/browse/JBESB-1701) for adding an explanation on filter, hopefully it explain well. ;)

              I am consider this global filter similar to the servlet filter concept, it makes me understood better.

              BTW, it will pick up the filter class outside the jobssesb.sar.