-
-
Notifications
You must be signed in to change notification settings - Fork 754
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
Allow DI to instanciate xxxFactory #1785
Comments
Commit 9371be0 makes it harder (or even impossible?) to inject
The atmosphere-guice extension is configured to use the same injector as my application, which means that my provider method will be invoked when Atmosphere's Removing the provider method makes Guice create a new I think there are two ways to work around this problem:
Thoughts on this, @jfarcand? |
DefaultAtmosphereResourceFactory has been added recently, as well as https://github.com/Atmosphere/atmosphere/blob/master/modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereFramework.java#L3028 . We cannot use |
Heh, didn't check the master branch. ;) Sorry for that. So can I backport the interface and DefaultAtmosphereResourceFactory in order to resolve my issue? Without the new Async API I guess? And yes, I agree with you about |
Yes you can backport except the new API if that fixes Guice. Let me know once done as I'm planning to cut the release today (will test once your changes are in). |
Of course it's not so easy..
I don't like breaking backward compatibility, so I suggest either solution 2 or 3. What do you think? |
True |
What do you think about slovdahl@e0f8852? It's in my private fork, I'll push it if it looks okay. |
+1 |
Make AtmopshereResourceFactory abstract and implement it in DefaultAtmosphereResourceFactory.
A default constructor instead of the current one will do the work, with class creation delagated to
AtmosphereObjectFactory
The text was updated successfully, but these errors were encountered: