Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changing scope of InstantiateObserver #278

Merged
merged 1 commit into from
Dec 11, 2013
Merged

changing scope of InstantiateObserver #278

merged 1 commit into from
Dec 11, 2013

Conversation

mariofts
Copy link
Member

closes #276

@@ -36,7 +36,7 @@
* @author Guilherme Silveira
* @author Rodrigo Turini
*/
@ApplicationScoped
@RequestScoped
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only way to solve this concurrency problem is really creating an InstantiateObserver
each request? Did you try inject Container on observer method? I'm not sure, but it may work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that you can't have a instance of ControllerInstance, because it can be replaced by another thread between the instantiate and getControllerInstance

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Now that I realized that InstantiateObserver are not stateless. Ok then, 🍧

mariofts added a commit that referenced this pull request Dec 11, 2013
changing scope of InstantiateObserver. closes #276
@mariofts mariofts merged commit f7a2929 into master Dec 11, 2013
@mariofts mariofts deleted the i276concurrency branch December 11, 2013 20:27
@Turini Turini added this to the 4.0.0-beta-4 milestone Mar 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concurrency problems with controller instance
2 participants