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

Fix exception preventing proper shutdown of Atmosphere. #2194

Merged
merged 1 commit into from Jul 27, 2016
Merged

Fix exception preventing proper shutdown of Atmosphere. #2194

merged 1 commit into from Jul 27, 2016

Conversation

seamusmac
Copy link
Contributor

This allows for redeploy to properly work.

This allows for redeploy to properly work.
@seamusmac
Copy link
Contributor Author

When testing hot redeploy for an application I have that uses the Shiro framework, I found that while the shutdown happens, I was getting the following exception:

org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration. at org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:123) ~[shiro-core-1.2.4.jar:1.2.4] at org.apache.shiro.subject.Subject$Builder.<init>(Subject.java:627) ~[shiro-core-1.2.4.jar:1.2.4] at org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:56) ~[shiro-core-1.2.4.jar:1.2.4] at org.atmosphere.cpr.AtmosphereRequestImpl.getSession(AtmosphereRequestImpl.java:694) ~[atmosphere-runtime-2.4.5.jar:2.4.5] [2 skipped] at org.atmosphere.cpr.SessionTimeoutSupport.restoreTimeout(SessionTimeoutSupport.java:69) ~[atmosphere-runtime-2.4.5.jar:2.4.5] at org.atmosphere.cpr.AtmosphereResourceImpl.cancel(AtmosphereResourceImpl.java:817) ~[atmosphere-runtime-2.4.5.jar:2.4.5] at org.atmosphere.cpr.AtmosphereResourceImpl.close(AtmosphereResourceImpl.java:900) ~[atmosphere-runtime-2.4.5.jar:2.4.5] at com.ardan1.config.AFramework.closeAtmosphereResource(AFramework.java:16) ~[classes/:na] at org.atmosphere.cpr.AtmosphereFramework.destroy(AtmosphereFramework.java:1806) [atmosphere-runtime-2.4.5.jar:2.4.5]

This prevents a proper shutdown from working. If I catch the exception, everything works as expected.

Do you guys think this is a change that can be merged?

@seamusmac
Copy link
Contributor Author

@elakito @jfarcand Is this change ok?

@elakito elakito merged commit 283f0f5 into Atmosphere:atmosphere-2.4.x Jul 27, 2016
@elakito
Copy link
Contributor

elakito commented Jul 27, 2016

@seamusmac I merged it. Thanks.

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.

None yet

2 participants