Uploaded image for project: 'Spring Data GemFire'
  1. Spring Data GemFire
  2. SGF-333

The SpringContextBootstrappingInitializer needs to handle the case when it's init(:Properties) method maybe called more than once on initialization.

    XMLWordPrintable

    Details

      Description

      Spring Data GemFire's SpringContextBootstrappingInitializer is used by a user to bootstrap a Spring ApplicationContext inside a GemFire JVM process (e.g. GemFire Server) on start.

      The user provides a small snippet of cache.xml like so...

      <?xml version="1.0"?>
      <!DOCTYPE cache PUBLIC  "-//GemStone Systems, Inc.//GemFire Declarative Caching 7.0//EN"
        "http://www.gemstone.com/dtd/cache7_0.dtd">
      <cache>
        <initializer>
          <class-name>org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer</class-name>
          <parameter name="contextConfigLocations">
            <string>
              classpath:path/to/spring/application/context.xml
            </string>
          </parameter>
        </initializer>
      </cache>
      

      And then proceeds to use Gfsh to launch the GemFire Server and bootstrap the Spring ApplicationContext...

      gfsh>start server --name=X ... --cache-xml-file=cache.xml
      

      This will enable a Spring ApplicationContext to be started in a GemFire Server process. The benefit of using the SpringContextBootstrappingInitializer is that the GemFire Server can be configured mostly with Spring config (minus the Cache instance). In addition, an GemFire defined components (e.g. CacheListener, CacheLoader, etc) declared in cache.xml can be lazily wired with Spring beans.

      There are situations, through rare, where the SpringContextBootstrappingInitializer's (GemFire Delcarables) init(:Properties) method maybe called more than once.

      This improvement is meant to handle this case.

        Attachments

          Activity

            People

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

              Dates

              Due:
              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.5d
                0.5d
                Remaining:
                Remaining Estimate - 0.5d
                0.5d
                Logged:
                Time Spent - Not Specified
                Not Specified