cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I am trying to associate configuration values to the bean during initialization. The runtimeConfig is a service class that looks up the input parameter from DB. Saw some examples in google that the below approach is possible. However, I am getting the below exception:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mqQueueConnectionFactory' defined in class path resource [orrpocintegration-messaging-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is java.lang.NullPointerException

My Spring Configuration:

where

 <bean name="defaultRuntimeConfigurationService" class="com.prasun.integration.runtime.service.impl.DefaultRuntimeConfigurationService" />

Need help. Thanks.

0 Likes
View Entire Topic
Former Member
0 Likes

My hybris is running on a cluster 6 nodes and I would need to change the configuration at runtime depending on situation. App Node hAC is not accessible. Hence, I am planning to use DB based configuration rather than using local.properties.

andyfletcher
Active Contributor
0 Likes

But that wouldn't work with your original config anyway. The properties aren't live they are just fed in at configuration time.

I'm not familiar with a Spring 'runtimeConfig' and can't find any documentation on it. How would it work? Is it wrapping the bean in a proxy that intercepts the getters? It's not at all clear from your example how this is supposed to work.

Perhaps something with a ConfigChangeListener and a ClusterAwareEvent to broadcast those changes would work for you?