These are chat archives for spring-cloud/spring-cloud

17th
Feb 2015
Dave Syer
@dsyer
Feb 17 2015 07:28
Thanks
Ken
@schultzy51
Feb 17 2015 20:07
i realize polling isn’t a recommended thing for Environment changes but is there an example of that for a proof of concept? Based on the documentation it sounds like there is but it’s not published.
Ken
@schultzy51
Feb 17 2015 20:53
I imagine the update should use org.springframework.cloud.context.environment.EnvironmentManager
Ken
@schultzy51
Feb 17 2015 23:10
One additional thing. I’ve been trying to determine when an application will use the ContextRefreshedEvent after initialization since the discovery of the cloud config server depends on it to update the uri. If it’s not triggered often enough and the cloud config registration with Eureka changes it might never check Eureka again to retrieve the updated registration. It looks like it mostly happens during the initialization of the application, but maybe I’m missing something.
Dave Syer
@dsyer
Feb 17 2015 23:18
Not following that, sorry. ContextRefreshedEvent happens once in the lifecycle of an application context. Nothing to do with discovery.
The discovery of configserver depends on the ContextRefreshedEvent
InstanceInfo server = this.client.getNextServerFromEureka(this.config .getDiscovery().getServiceId(), false);
Ken
@schultzy51
Feb 17 2015 23:30
Or at least that’s the way it looks. I hope I’m interpreting this correctly.