You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/06/12 04:48:22 UTC
incubator-ignite git commit: # ignite-gg-10416 Fixed spring exclude
properties.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-gg-10416 [created] 178c4f85d
# ignite-gg-10416 Fixed spring exclude properties.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/178c4f85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/178c4f85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/178c4f85
Branch: refs/heads/ignite-gg-10416
Commit: 178c4f85dca8d050754994b8baaaa48f011e84bc
Parents: 4375529
Author: Andrey <an...@gridgain.com>
Authored: Fri Jun 12 05:48:12 2015 +0300
Committer: Andrey <an...@gridgain.com>
Committed: Fri Jun 12 05:48:12 2015 +0300
----------------------------------------------------------------------
.../util/spring/IgniteSpringHelperImpl.java | 58 +++++++++++++-------
.../scala/org/apache/ignite/visor/visor.scala | 3 +-
2 files changed, 39 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/178c4f85/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index 2c7c7e1..4cc080a 100644
--- a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -405,32 +405,48 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
GenericApplicationContext springCtx = new GenericApplicationContext();
BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
- @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
- throws BeansException {
- for (String beanName : beanFactory.getBeanDefinitionNames()) {
- BeanDefinition def = beanFactory.getBeanDefinition(beanName);
-
- if (def.getBeanClassName() != null) {
- try {
- Class.forName(def.getBeanClassName());
- }
- catch (ClassNotFoundException ignored) {
- ((BeanDefinitionRegistry) beanFactory).removeBeanDefinition(beanName);
-
- continue;
+ /**
+ * @param beanFactory The bean factory used by the application context.
+ * @param beanName Bean name.
+ * @param def Registered BeanDefinition.
+ * @throws BeansException in case of errors.
+ */
+ private void processBeanDefinition(ConfigurableListableBeanFactory beanFactory, String beanName,
+ BeanDefinition def) throws BeansException {
+ if (def.getBeanClassName() != null) {
+ try {
+ Class.forName(def.getBeanClassName());
+
+ MutablePropertyValues vals = def.getPropertyValues();
+
+ for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
+ for (String excludedProp : excludedProps) {
+ if (val.getName().equals(excludedProp)) {
+ vals.removePropertyValue(val);
+
+ return;
+ }
+ }
+
+ if (val.getValue() instanceof Iterable)
+ for (Object beanDef : (Iterable)val.getValue())
+ if (beanDef instanceof BeanDefinitionHolder)
+ processBeanDefinition(beanFactory, beanName,
+ ((BeanDefinitionHolder)beanDef).getBeanDefinition());
}
}
-
- MutablePropertyValues vals = def.getPropertyValues();
-
- for (PropertyValue val : new ArrayList<>(vals.getPropertyValueList())) {
- for (String excludedProp : excludedProps) {
- if (val.getName().equals(excludedProp))
- vals.removePropertyValue(val);
- }
+ catch (ClassNotFoundException ignored) {
+ ((BeanDefinitionRegistry) beanFactory).removeBeanDefinition(beanName);
}
}
}
+
+ /** {@inheritDoc} */
+ @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
+ throws BeansException {
+ for (String beanName : beanFactory.getBeanDefinitionNames())
+ processBeanDefinition(beanFactory, beanName, beanFactory.getBeanDefinition(beanName));
+ }
};
springCtx.addBeanFactoryPostProcessor(postProc);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/178c4f85/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index c943fc5..5f63f23 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -1573,7 +1573,8 @@ object visor extends VisorTag {
try
// Cache, IGFS, streamer and DR configurations should be excluded from daemon node config.
spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
- "streamerConfiguration", "drSenderConfiguration", "drReceiverConfiguration").get1()
+ "streamerConfiguration", "drSenderConfiguration", "drReceiverConfiguration",
+ "interopConfiguration", "indexingSpi").get1()
finally {
if (log4jTup != null)
U.removeLog4jNoOpLogger(log4jTup)