Java Code Examples for org.apache.shiro.util.LifecycleUtils#destroy()
The following examples show how to use
org.apache.shiro.util.LifecycleUtils#destroy() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CustomResolverTest.java From usergrid with Apache License 2.0 | 6 votes |
@AfterClass public static void tearDownShiro() { doClearSubject(); try { org.apache.shiro.mgt.SecurityManager securityManager = SecurityUtils.getSecurityManager(); LifecycleUtils.destroy( securityManager ); } catch ( UnavailableSecurityManagerException e ) { // we don't care about this when cleaning up the test environment // (for example, maybe the subclass is a unit test and it didn't // need a SecurityManager instance because it was using only // mock Subject instances) } SecurityUtils.setSecurityManager( null ); }
Example 2
Source File: AbstractShiroTest.java From seed with Mozilla Public License 2.0 | 5 votes |
@AfterClass public static void tearDownShiro() { doClearSubject(); try { SecurityManager securityManager = getSecurityManager(); LifecycleUtils.destroy(securityManager); } catch (UnavailableSecurityManagerException e) { // we don't care about this when cleaning up the test environment // (for example, maybe the subclass is a unit test and it didn't // need a SecurityManager instance because it was using only // mock Subject instances) } setSecurityManager(null); }
Example 3
Source File: AbstractShiroTest.java From gazpachoquest with GNU General Public License v3.0 | 5 votes |
@AfterClass public static void tearDownShiro() { doClearSubject(); try { SecurityManager securityManager = getSecurityManager(); LifecycleUtils.destroy(securityManager); } catch (UnavailableSecurityManagerException e) { // we don't care about this when cleaning up the test environment // (for example, maybe the subclass is a unit test and it didn't // need a SecurityManager instance because it was using only // mock Subject instances) } setSecurityManager(null); }
Example 4
Source File: ShiroLogin.java From gazpachoquest with GNU General Public License v3.0 | 5 votes |
public static void tearDownShiro() { doClearSubject(); try { SecurityManager securityManager = getSecurityManager(); LifecycleUtils.destroy(securityManager); } catch (UnavailableSecurityManagerException e) { // we don't care about this when cleaning up the test environment // (for example, maybe the subclass is a unit test and it didn't // need a SecurityManager instance because it was using only // mock Subject instances) } setSecurityManager(null); }
Example 5
Source File: DefaultSecuritySystem.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
@Override protected void doStop() throws Exception { realmManager.stop(); LifecycleUtils.destroy(realmSecurityManager); }