Package org.alfresco.util
Class RuntimeSystemPropertiesSetter
java.lang.Object
org.alfresco.util.RuntimeSystemPropertiesSetter
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.config.BeanFactoryPostProcessor,org.springframework.context.ApplicationContextAware,org.springframework.core.Ordered,org.springframework.core.PriorityOrdered
public class RuntimeSystemPropertiesSetter
extends Object
implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.context.ApplicationContextAware, org.springframework.core.PriorityOrdered
Sets runtime JVM system properties for Spring Framework.
This class is used by the Spring framework to inject system properties into the runtime environment (e.g.: alfresco.jmx.dir). The motivation for this is that certain values must be set within spring must be computed in advance for org.springframework.beans.factory.config.PropertyPlaceholderConfigurer to work properly.
- Author:
- Jon Cox
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()voidpostProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetJvmProperties(Map<String, String> jvmProperties) Set the properties that will get pushed into the JVM system properties.voidsetOrder(int order)
-
Constructor Details
-
RuntimeSystemPropertiesSetter
public RuntimeSystemPropertiesSetter()
-
-
Method Details
-
setJvmProperties
Set the properties that will get pushed into the JVM system properties. This will be akin to running the JVM with the -Dprop=value. Existing system JVM properties will not be overwritten.- Parameters:
jvmProperties- properties to set if they are not already present in the VM
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor- Throws:
org.springframework.beans.BeansException
-
setOrder
public void setOrder(int order) -
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-