[jira] Created: (STOMP-9) support shutdown of embeded stompconnect in Main

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] Created: (STOMP-9) support shutdown of embeded stompconnect in Main

JIRA jira@codehaus.org
support shutdown of embeded stompconnect in Main

                 Key: STOMP-9
                 URL: http://jira.codehaus.org/browse/STOMP-9
             Project: Stomp
          Issue Type: Improvement
            Reporter: Bryan Talbot
            Priority: Minor
         Attachments: mainstop.patch

When embedding stompconnect in another java program which has the ability to hot deploy and hot undeploy conforming modules, a method is needed to support a clean shutdown of stomp.

For example, stompconnect can be deployed as a static jms application in SwiftMQ without changes.  To support dynamic deployment (and undeployment) a shutdown method is needed.

Attached is a simple patch to add a method to Main to support dynamic shutdown of stompconnect.

Index: src/main/java/org/codehaus/stomp/jms/Main.java
--- src/main/java/org/codehaus/stomp/jms/Main.java      (revision 87)
+++ src/main/java/org/codehaus/stomp/jms/Main.java      (working copy)
@@ -24,7 +24,7 @@
  * @version $Revision$
 public class Main {
-    protected StompConnect connect = new StompConnect();
+    final private static StompConnect connect = new StompConnect();
     public static void main(String[] args) {
         try {
@@ -44,6 +44,10 @@
+    public static void stop() throws Exception {
+       connect.stop();
+    }
     public boolean parseArguments(String[] args) {
         if (args.length > 0) {
             String arg = args[0];

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


To unsubscribe from this list, please visit: