Uploaded image for project: 'Spring Data Geode'
  1. Spring Data Geode
  2. DATAGEODE-352

EnableEntityDefinedRegions.includeFilters are inappropriately overridden by framework provided include filters

    XMLWordPrintable

    Details

      Description

      As an Spring [Boot] application developer developing Spring applications using Apache Geode or VMware GemFire, and I declare and use the @EnableEntityDefinedRegions annotation in my Spring application @Configuration class to create GemFire/Geode Regions from application entity classes, then I expect the includeFilters to limit entity classes discovered in the scan when identifying GemFire/Geode Regions to create.

      Currently, all Regions defined by application entities in the declared application entity class packages are created because the SDG framework include filters are overriding the user-defined includeFilters.

      Keep in mind, the includeFilters, as implied in the Spring Framework @ComponentScan annotation, includeFilters attribute, are combined using the logical OR operator. Additionally, includeFilters can cancel the effect of 1 or more excludeFilters. So be mindful when using these 2 attributes in conjunction with each other.

      The SDG framework provides @Region annotated (and variants) AnnotationTypeFilters for all the @Region like mapping annotations (see here). If an application entity class matches 1 of the user-defined includeFilters or 1 of the SDG framework @.*Region AnnotationTypeFilters during the scan then the entity class is included and the declared Region will be created.

      While application entity classes should and must include an @.*Region mapping annotation to be included in the scan, this should not be either "OR". Rather, the includeFilters defined by a user should be ANDed with the framework includeFilters.

        Attachments

          Activity

            People

            Assignee:
            jblum John Blum
            Reporter:
            jblum John Blum
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: