If we have thousands of DataSources, when resolvedDefaultDataSource is putting DataSource to map, other threads cannot get the DataSources from previous map
Comment From: pivotal-issuemaster
@TurboTurn Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-issuemaster
@TurboTurn Thank you for signing the Contributor License Agreement!
Comment From: quaff
Bean will not be available until afterPropertiesSet
called, so It's safe already.
Comment From: TurboTurn
Bean will not be available until
afterPropertiesSet
called, so It's safe already.
How do you guarantee it? My project has encountered this problem.
Comment From: quaff
Bean will not be available until
afterPropertiesSet
called, so It's safe already.How do you guarantee it? My project has encountered this problem.
Spring will guarantee it, please show your code snippet
Comment From: TurboTurn
Bean will not be available until
afterPropertiesSet
called, so It's safe already.How do you guarantee it? My project has encountered this problem.
Spring will guarantee it, please show your code snippet
I need to add and delete DataSources dynamically at runtime, and I call the 'afterPropertiesSet' manually. How will Spring guarantee it
Comment From: quaff
Bean will not be available until
afterPropertiesSet
called, so It's safe already.How do you guarantee it? My project has encountered this problem.
Spring will guarantee it, please show your code snippet
I need to add and delete DataSources dynamically at runtime, and I call the 'afterPropertiesSet' manually. How will Spring guarantee it
You should create your own implementation extends this class, add a new method such as public void rebuild(){}
.
Comment From: TurboTurn
Bean will not be available until
afterPropertiesSet
called, so It's safe already.How do you guarantee it? My project has encountered this problem.
Spring will guarantee it, please show your code snippet
I need to add and delete DataSources dynamically at runtime, and I call the 'afterPropertiesSet' manually. How will Spring guarantee it
You should create your own implementation extends this class, add a new method such as
public void rebuild(){}
.Bean will not be available until
afterPropertiesSet
called, so It's safe already.How do you guarantee it? My project has encountered this problem.
Spring will guarantee it, please show your code snippet
I need to add and delete DataSources dynamically at runtime, and I call the 'afterPropertiesSet' manually. How will Spring guarantee it
You should create your own implementation extends this class, add a new method such as
public void rebuild(){}
.
I have extends AbstractRoutingDataSource
, but resolvedDataSources
is private, I can only call setTargetDataSources
and afterPropertiesSet
, even if i add method rebuild(), i can not access to resolvedDataSources
.
Comment From: quaff
Bean will not be available until
afterPropertiesSet
called, so It's safe already.How do you guarantee it? My project has encountered this problem.
Spring will guarantee it, please show your code snippet
I need to add and delete DataSources dynamically at runtime, and I call the 'afterPropertiesSet' manually. How will Spring guarantee it
You should create your own implementation extends this class, add a new method such as
public void rebuild(){}
.Bean will not be available until
afterPropertiesSet
called, so It's safe already.How do you guarantee it? My project has encountered this problem.
Spring will guarantee it, please show your code snippet
I need to add and delete DataSources dynamically at runtime, and I call the 'afterPropertiesSet' manually. How will Spring guarantee it
You should create your own implementation extends this class, add a new method such as
public void rebuild(){}
.I have extends
AbstractRoutingDataSource
, butresolvedDataSources
is private, I can only callsetTargetDataSources
andafterPropertiesSet
, even if i add method rebuild(), i can not access toresolvedDataSources
.
I think changing the modifier of resolvedDataSources
from private
to protected
is much better.
Comment From: TurboTurn
spring team may not
Comment From: snicoll
thanks for the PR but we can't accept a code change that has no additional tests to exercise what was changed. Thanks anyway.