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:
  • Constructor Details

    • RuntimeSystemPropertiesSetter

      public RuntimeSystemPropertiesSetter()
  • Method Details

    • setJvmProperties

      public void setJvmProperties(Map<String,String> jvmProperties)
      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:
      setApplicationContext in interface org.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:
      postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • setOrder

      public void setOrder(int order)
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered