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

15th
Jan 2018
Furer Alexander
@jvmlet
Jan 15 2018 06:54

Hello, I'm using SCDF cloud foundry server and using manifest to bind services to tasks ans stream apps, my question is how can I bind particular service to specific task/stream app, so far I have

SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_STREAM_SERVICES: serviceName1
SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_TASK_SERVICES: serviceName2

which binds serviceName1 and serviceName2 to each stream/task app, please advise
Thanks

Jagmohan Sharma
@JagmohanSharma
Jan 15 2018 11:09
@dsyer Thank you for your assist and suggestion previously. I did some changes but facing issue with refreshing dynamically created beans using BeanDefinitionRegisteryPostProcessor. Please find details here. spring-cloud/spring-cloud-commons#308 .
Dave Syer
@dsyer
Jan 15 2018 13:48
Your tests are green for me. Is there something else I have to do?
Jagmohan Sharma
@JagmohanSharma
Jan 15 2018 13:57
Actually I left @RefreshScope on TestDynaPropRefresh which I think should not be required to achieve refreshing of registered beans through BeanDefinitionRegistryPostProcessor. As those beans are already set with refresh scope. I have updated the code.
Dave Syer
@dsyer
Jan 15 2018 14:12
So what does the code do?
It looks for existing beans of a specific type, and tries to add refresh scope?
I'm a bit confused by the logic in the BFPP
Dave Syer
@dsyer
Jan 15 2018 14:20
OK, I get it, I think.
It creates beans of a certain type, using a FactoryBean. The FactoryBean is in refresh scope.
I think that's the issue.
The product of the factory bean is not itself refreshable.
Jagmohan Sharma
@JagmohanSharma
Jan 15 2018 15:17
okk.
Dave Syer
@dsyer
Jan 15 2018 15:20
It might be better to create the beans without a factory, and add a post processor to do the work in the factory (essentially binding properties from the environment)