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

Warnings when using AtmosphereSupport in multiple ScalatraServlets #651

Open
CarlEkerot opened this issue Apr 24, 2017 · 0 comments
Open

Comments

@CarlEkerot
Copy link

When creating an application with multiple instances of ScalatraServlet implementing AtmosphereSupport, the atmosphere internals will yield the following log messages:

12:12:27.406 [run-main-0] WARN  org.atmosphere.cpr.Universe - More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.ScalatraBroadcasterFactory@294d80e5
12:12:27.406 [run-main-0] WARN  org.atmosphere.cpr.Universe - More than one Universe configured. Universe class will gives wrong object reference org.atmosphere.cpr.DefaultAtmosphereResourceFactory@6b169751
12:12:27.406 [run-main-0] WARN  org.atmosphere.cpr.Universe - More than one Universe configured. Universe class will gives wrong object reference org.scalatra.atmosphere.ScalatraAtmosphereFramework@69a94550

As far as I can tell, this is due to the AtmosphereFramework being unconditionally initialized twice. Apparently the framework holds some global state in org.atmosphere.cpr.Universe which produces the log messages above.

Here's an example that reproduces the warning logs, based on the reference atmosphere app running on top of embedded Jetty:
CarlEkerot/scalatra-website-examples@41bcd20

I've bumped the versions to match the versions in the environment I saw the warning logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants