Java Code Examples for sun.awt.AppContext#dispose()

The following examples show how to use sun.awt.AppContext#dispose() . 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: AppletClassLoader.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 2
Source File: AppletClassLoader.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 3
Source File: AppletClassLoader.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 4
Source File: AppletClassLoader.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 5
Source File: AppletClassLoader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 6
Source File: AppletClassLoader.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 7
Source File: AppletClassLoader.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 8
Source File: AppletClassLoader.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 9
Source File: AppletClassLoader.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 10
Source File: AppletClassLoader.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 11
Source File: AppletClassLoader.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 12
Source File: AppletClassLoader.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}
 
Example 13
Source File: AppletClassLoader.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Release this AppletClassLoader and its ThreadGroup/AppContext.
 * If nothing else has grabbed this AppletClassLoader, its ThreadGroup
 * and AppContext will be destroyed.
 *
 * Because this method may destroy the AppletClassLoader's ThreadGroup,
 * this method should NOT be called from within the AppletClassLoader's
 * ThreadGroup.
 *
 * Changed modifier to protected in order to be able to overwrite this
 * function in PluginClassLoader.java
 */
protected void release() {

    AppContext tempAppContext = null;

    synchronized(grabReleaseSynchronizer) {
        if (usageCount > 1)  {
            --usageCount;
        } else {
            synchronized(threadGroupSynchronizer) {
                tempAppContext = resetAppContext();
            }
        }
    }

    // Dispose appContext outside any sync block to
    // prevent potential deadlock.
    if (tempAppContext != null)  {
        try {
            tempAppContext.dispose(); // nuke the world!
        } catch (IllegalThreadStateException e) { }
    }
}