Removed the ClientCacheFactoryBean.readyForEvents() method and moved the logic to onApplicationEvent(..).
Updated the spring-gemfire 1.6 and 1.7 XSD with the new keep-alive attribue on the client-cache element.
Changed the generic signature of the CacheFactoryBean class back to com.gemstone.gemfire.cache.Cache due to the Spring container bean resolution Exception when using JavaConfig in SDG 1.7 with GemFire 8.1 and core Spring Framework 4.1.7.
(cherry picked from commit a458115c7f145bce9f02af71572920894ba66465)
Signed-off-by: John Blum <jblum@pivotal.io>
Additional changes and refactoring inspired by Spring Data MongoDB custom SimpleTypeHolder.
(cherry picked from commit 2344eb521df7326b06740c5196eeea4669c9349e)
Signed-off-by: John Blum <jblum@pivotal.io>
Fixes SnapshotServiceFactoryBeanTest.toSimpleFilenameUsingVariousPathnames(..) and the SnapshotServiceImportExportIntegrationTest failures on MS Windows due to file system path issues.
(cherry picked from commit 87f00274d5bd571577528902fc4de2fdbfcd32c8)
Signed-off-by: John Blum <jblum@pivotal.io>
Renamed the <gfe-data:snapshot-service> element 'suppress-init-import' attribute to 'suppress-import-on-init'.
Fixed up the JSONRegionAdviceTest class test case failures due to changes in the ..repository.sample.Person application domain object class.
(cherry picked from commit d9245f343050182f570a0ea1bf629f03258667b1)
Signed-off-by: John Blum <jblum@pivotal.io>
Repackaged all GemFire Snapshot Service support classes in Spring Data GemFire under org.springframework.data.gemfire.snapshot.
Moved snapshot application events to ..snapshot.event.
Moved the ComposableSnapshotFilter class to ..snapshot.filter.
(cherry picked from commit 5bf3e8e8132c9cff0c3da33b271bfa4e049968c0)
Signed-off-by: John Blum <jblum@pivotal.io>
Refactored the SnapshotServiceFactoryBean with the addition of a new property (suppressInitImport) to suppress importing on initialization.
Refactored the SnapshotServiceFactoryBean SnapshotServiceAdapter interface's doImport(..) and doExport(..) method signatures to varargs.
Added the ComposableSnapshotFilter class implemeting the SnapshotFilter interface and Composition Design Pattern for composing multiple SnapshotFilters into one using logical operators.
Cleaned up and added addition unit tests.
Completed all integration testing including testing with export and import snapshot application event driven GemFire Cache Region snapshots.
Refactored the SnapshotApplicationEvent into 2 separate ApplicationEvent classes to handle import and exports.
Refactored the SnapshotServiceFactoryBean class to handle import/export SnapshotApplicationEvents in onApplicationEvent(:SnapshotApplicationEvent).
Added integration tests for the archive file handling capabilities of the SnapshotServiceFactoryBean.SnapshotServiceAdapterSupport class.
Added additional unit tests.
(cherry picked from commit 35107aa12dc9d5f133697775c2535c1f9cd3cd87)
Signed-off-by: John Blum <jblum@pivotal.io>
Refactored the ServiceSnapshotFactoryBean class to handle ZIP and JAR files as input sources on GemFire Cache data imports.
Added additional unit tests for SnapshotServiceFactoryBean to improve coverage along with a basic integration test covering import and export.
Fixed bugs in the SnapshotServiceParser and the XSD.
Moved the iterable(:Enumeration) and iterable(:Iterator) methods from the test CollectionUtils class to the 'official' CollectionUtils class.
(cherry picked from commit b47884c88c52b612aff6b8aa01fc0994ac42095c)
Signed-off-by: John Blum <jblum@pivotal.io>
Introduced a SnapshotApplicationEvent extending Spring ApplicationEvent to allow SDG-based GemFire applications to trigger GemFire Cache Region data snapshots (export ops).
Refactored SnapshotServiceFactoryBean to be a ApplicationListener on SnapshotApplicationEvents.
Introduced ExportSnapshotException and ImportSnapshotException to more succinctly desribe the snapshot import/export error.
Refactored CacheSnapshotServiceAdapter.doImport(..) method to invoke load(:SnapshotFormat, :SnapshotOptions, :File...), i.e. file-based in order to apply the SnapshotFilter on load, which is not applicable to the CacheSnapshotService.load(:File, :SnapshotFormat) method that assumes the 'File' is a directory. Therefore doImport(..) expands the directory if the File given is indeed a valid file system directory.
Added additional unit tests.
(cherry picked from commit 96f6a70595543bc375b2f346bd1c0932b174e2b6)
Signed-off-by: John Blum <jblum@pivotal.io>
Adding integration tests to test the use of the custom OQL Query Annotation extensions in Repository Query methods against GemFire's actual OQL Query engine.
(cherry picked from commit bdbf101fd7f3e920f28634bb24cd0667855fa1e2)
Signed-off-by: John Blum <jblum@pivotal.io>
Implementation and unit test coverage complete.
(cherry picked from commit 23d05aeaee743922a9d371b8b7f8201e6cb9578c)
Signed-off-by: John Blum <jblum@pivotal.io>
Fixed test failures associated with changes to LazyWiringDeclarableSupport passing the ApplicationContext onApplicationEvents (ContextRefreshedEvent) directly rather than the ApplicationContext's ConfigurableListableBeanFactory required by BeanConfigurerSupport.
(cherry picked from commit be6a3aac3e5281fdb2c77ad8b88200c92c0b7883)
Signed-off-by: John Blum <jblum@pivotal.io>
Additional refactoring and added serveral unit tests.
(cherry picked from commit a806f1540e6fc995410671f34382d14389ace90a)
Signed-off-by: John Blum <jblum@pivotal.io>
Removed the custom BeanPropertyAccessor implementation that was introduced to compensate for the removal of BeanWrapper in Spring Data Commons. That removal however was already preceded by an alternative way to obtain a PropertyAccessor via the PersistentEntity, which is what we're now doing.(cherry picked from commit 85c333dfc582719229fee006e538ff77f569a242)
Signed-off-by: John Blum <jblum@pivotal.io>
Final touches on the SDG Expiration annotation based support. Added additional test cases to test the improper specification of Expiration annotation attribute settings and modified the SDG Reference Guide to discuss Spring Property Placeholder and SpEL support.
(cherry picked from commit 278af87703dfbc341fef1690e7064d9de80fc295)
Signed-off-by: John Blum <jblum@pivotal.io>
Added support for Spring Property Placeholders in the @Expiration annotation attributes to offer even more flexibility when configuring Region Entry values, application domain object Expiration policies and settings.
(cherry picked from commit 92f3c4e80839ed4034fe3229c68aebf90091c9a1)
Signed-off-by: John Blum <jblum@pivotal.io>
Added support for SpEL expressions in the @Expiration annotation attributes to offer even more flexibility when configuring Region Entry values, application domain object Expiration policies and settings.
(cherry picked from commit 6e73f52025509d9bf89a3baf25d21201b49728de)
Signed-off-by: John Blum <jblum@pivotal.io>
Fixed up the GemFireDataSourceUsingNonSpringConfiguredGemFireServerIntegrationTest to customize the classpath in order to exlude the Spring Data GemFire dependency from the non-Spring-configured GemFire Server's classpath thereby removing any presence of the ListRegionsOnServerFunction GemFire Function; made use of the com.gemstone.gemfire.distributed.ServerLauncher class for launching the non-Spring-configured GemFire Server and finally, wrote the gemfire-datasource-integration-test-cache.xml as an cache.xml file to the non-Spring-configured GemFire Server's working directory to properly configure the GemFire Server.
(cherry picked from commit 65ab1c7dcd7aec6fbc09241c1b3be0709b9bfb01)
Signed-off-by: John Blum <jblum@pivotal.io>
Refactored the GemfireDataSourcePostProcessorTest class test cases based on the new implementation of the GemfireDataSourcePostProcessor BeanFactoryPostProcessor, which uses the GemFire internal GetRegionsFunction GemFire Function as a fallback when the ListRegionsOnServerFunction has not been registered or is not available. In addition, added 2 integration tests to test a Spring Data GemFire ClientCache connecting to a Spring-configured GemFire Server and non-Spring-configured GemFire Server asserting that client PROXY Region beans are appropriately created in the Spring ApplicationContext.
(cherry picked from commit 52e4be42402ee376df17d7ae036336548b1349c9)
Signed-off-by: John Blum <jblum@pivotal.io>
Adding unit tests for the GemfireDataSourcePostProcessor class.
(cherry picked from commit 0055a79a5d0119c0813f86a6504427d3d2d885a6)
Signed-off-by: John Blum <jblum@pivotal.io>
(cherry picked from commit 130cc4ca4c84a0151ba8f98194a3522ac7e34121)
Signed-off-by: John Blum <jblum@pivotal.io>
Added additional test cases for the CacheFactoryBean and ClientCacheFactoryBean based on SSL support. 1.7 SDG XSD cleanup.
Modified the SDG apache-geode build to resolve Apache Geode artifacts from the Apache Maven Repo instead of Spring's Maven Repo. Performed minor code modifications based on the 'latest' Apache Geode build snapshot. Modified the generated SDG Maven POM to declare the Apache Maven Snapshot Repo in order to properly resolve the Apache Geode build snapshot artifacts.
Fixed up and polished additional SDG test suite classes related to Pivotal GemFire functionality and features when ran with Apache Geode. Also introduced a GemfireFeature enumerated type to implement more fine-grained control of specific feature checking when attributes of XML namespace elements refer to Pivotal GemFire specific features.
First iteration of SDG's test suite ran with Apache Geode; Implemented Spring test framework, profile support to enable/disable tests based on the presence of either Apache Geode or Pivotal GemFire.
Fixed up and polished the GatewaySenderFactoryBean 'orderPolicy' configuration and validation changing the loosely, String-typed 'orderPolicy' property to use the GatewaySender.OrderPolicy enum.