DATAGEODE-53 - Beans proxied by the Spring container with declared CQs are not registered and triggered.

This commit is contained in:
John Blum
2017-10-23 11:05:11 -07:00
parent ce5c2aec0d
commit a8bc9c7f0a
2 changed files with 2 additions and 5 deletions

View File

@@ -124,8 +124,7 @@ public class ContinuousQueryConfiguration extends AbstractAnnotationConfigSuppor
}
else if (isApplicationBean(bean, beanName)) {
//Object resolvedBean = resolveTargetObject(bean);
Object resolvedBean = bean;
Object resolvedBean = resolveTargetObject(bean);
List<ContinuousQueryDefinition> definitions = stream(resolvedBean.getClass().getMethods())
.filter(method -> method.isAnnotationPresent(ContinuousQuery.class))
@@ -151,7 +150,7 @@ public class ContinuousQueryConfiguration extends AbstractAnnotationConfigSuppor
return Optional.ofNullable(bean)
//.filter(this::isNotProxy)
//.map(this::resolveTargetObject)
.map(this::resolveTargetObject)
.map(Object::getClass)
.map(Class::getPackage)
.map(Package::getName)

View File

@@ -166,7 +166,6 @@ public class EnableContinuousQueriesConfigurationUnitTests {
@SuppressWarnings("unused")
static class TestContinuousQueryRegistrationAndExecutionOnProxiedBeanConfiguration {
/*
@Bean
BeanPostProcessor proxyTestContinuousQueryComponentPostProcessor() {
@@ -183,7 +182,6 @@ public class EnableContinuousQueriesConfigurationUnitTests {
}
};
}
*/
@Bean("People")
Region<Long, Person> mockPeopleRegion(GemFireCache gemfireCache,