Skip to content

Thread-safety and visibility issues not documented [SPR-4307] #8986

@spring-projects-issues

Description

@spring-projects-issues

Stefan Fleiter opened SPR-4307 and commented

Neither spring's reference documentation nor the Javadoc mention the context thread-safety and visibility guarantees.

What can happen when multiple threads query for a bean during its' creation (singleton and prototype)?
Is it guaranteed that all threads see changes made by constructors and setters?
Does FactoryBean#getObject() has to be implemented thread-safe?

After a short analysis of AbstractBeanFactory all these aspects seem to be handled by the spring context.

Please document this.
The most important place is the reference documentation:
http://static.springframework.org/spring/docs/2.5.x/reference/beans.html
The Javadoc for all ApplicationContext- and BeanFactory-Classes should also state this.

Thanks a lot in advance.


Affects: 2.5 final

4 votes, 7 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions