From b7d8fda867d99f7c6c59a4e3083d2319b043752c Mon Sep 17 00:00:00 2001 From: Olivier Capillon Date: Wed, 10 Mar 2010 18:55:25 +0000 Subject: [PATCH] resolution of Bug 242: ExecutionFlowGenerator implements Ordered instead of PriorityOrdered, so that PropertyPlaceholderConfigurer are applied before ExecutionFlowGenerators. MultipleServiceExporterPostProcessor implements also Ordered so that it is called after ExecutionFlowGenerators. git-svn-id: https://svn.argeo.org/slc/trunk@3424 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../execution/generator/ExecutionFlowGenerator.java | 11 ++++++++--- .../osgi/MultipleServiceExporterPostProcessor.java | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/generator/ExecutionFlowGenerator.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/generator/ExecutionFlowGenerator.java index db1d276d7..0269e7299 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/generator/ExecutionFlowGenerator.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/generator/ExecutionFlowGenerator.java @@ -15,7 +15,6 @@ import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.core.Ordered; -import org.springframework.core.PriorityOrdered; /** * Generates ExecutionFlows and Runnables as @@ -27,7 +26,7 @@ import org.springframework.core.PriorityOrdered; * and outputs of a RunnableFactory. */ public class ExecutionFlowGenerator implements BeanFactoryPostProcessor, - PriorityOrdered { + Ordered { private final Log log = LogFactory.getLog(getClass()); @@ -65,6 +64,8 @@ public class ExecutionFlowGenerator implements BeanFactoryPostProcessor, * RunnableCallFlowDescriptor */ private String flowBeanNamesPrefix = ""; + + private int order = Ordered.HIGHEST_PRECEDENCE; public void postProcessBeanFactory( ConfigurableListableBeanFactory beanFactory) throws BeansException { @@ -136,7 +137,11 @@ public class ExecutionFlowGenerator implements BeanFactoryPostProcessor, } public int getOrder() { - return Ordered.HIGHEST_PRECEDENCE; + return order; + } + + public void setOrder(int order) { + this.order = order; } public void setSource(ExecutionFlowGeneratorSource source) { diff --git a/runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/MultipleServiceExporterPostProcessor.java b/runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/MultipleServiceExporterPostProcessor.java index f5d0a3853..e8e2bda39 100644 --- a/runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/MultipleServiceExporterPostProcessor.java +++ b/runtime/org.argeo.slc.support.osgi/src/main/java/org/argeo/slc/osgi/MultipleServiceExporterPostProcessor.java @@ -16,13 +16,12 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.core.Ordered; -import org.springframework.core.PriorityOrdered; import org.springframework.osgi.service.exporter.support.ExportContextClassLoader; import org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean; @SuppressWarnings(value = { "unchecked" }) public class MultipleServiceExporterPostProcessor implements - BeanFactoryPostProcessor, PriorityOrdered { + BeanFactoryPostProcessor, Ordered { private final static Log log = LogFactory .getLog(MultipleServiceExporterPostProcessor.class); @@ -31,6 +30,8 @@ public class MultipleServiceExporterPostProcessor implements private Class osgiServiceFactoryClass = OsgiServiceFactoryBean.class; private Boolean useServiceProviderContextClassLoader = false; + + private int order = Ordered.LOWEST_PRECEDENCE; public void postProcessBeanFactory( ConfigurableListableBeanFactory beanFactory) throws BeansException { @@ -83,7 +84,11 @@ public class MultipleServiceExporterPostProcessor implements } public int getOrder() { - return Ordered.LOWEST_PRECEDENCE; + return order; + } + + public void setOrder(int order) { + this.order = order; } public void setUseServiceProviderContextClassLoader( -- 2.39.5