-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #618 from renebock/shutdownhook
Add property to disable ERXShutdownHook feature
- Loading branch information
Showing
3 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,15 @@ | |
* } | ||
* }; | ||
* </pre></blockquote></p> | ||
* | ||
* | ||
* <b>CAUTION</b><br><br> | ||
* You should not use this class when deploying the application as a J2EE servlet as it may interfere with other servlets running in the same VM. | ||
* To disable this feature you have to provide the following start parameter to the java VM: | ||
* | ||
* <code> | ||
* -Der.extensions.ERXApplication.enableERXShutdownHook=false | ||
* </code><br> | ||
* | ||
* @author Maik Musall, [email protected] | ||
* | ||
|
@@ -37,7 +46,8 @@ public abstract class ERXShutdownHook extends Thread { | |
|
||
static final Set<ERXShutdownHook> ALL_HOOKS = new HashSet<ERXShutdownHook>(); | ||
|
||
static { | ||
public static void initERXShutdownHook() { | ||
System.out.println( "WILL ADD SHUTDOWNHOOK" ); | ||
Runtime.getRuntime().addShutdownHook( new Thread() { | ||
@Override | ||
public void run() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters