> With SwiftMQ2.0.1 my program using CLI would exit after about two
> minutes.
> 
> With 2.1.0 the VM doesn't exit at all (the release notes say that this
> problem was fixed, but it seems like the problem is only worse).
> 
> Anyone else experience this problem?

It works fine here with 2.1.0. Have you closed the JNDI context? Here is a 
small testdriver for you:

import javax.jms.*;
import javax.naming.*;
import java.util.*;
import com.swiftmq.admin.cli.*;
import com.swiftmq.admin.cli.event.*;

public class TestCLI
{
        public static void main(String[] args)
        {
                QueueConnection connection = null;
                CLI cli = null;
                try {
                        Hashtable env = new Hashtable();
                        
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.swiftmq.jndi.InitialContextFa
ctoryImpl");
                        
env.put(Context.PROVIDER_URL,"smqp://localhost:4001/timeout=10000");
                        InitialContext ctx = new InitialContext(env);
                        QueueConnectionFactory connectionFactory = 
(QueueConnectionFactory)ctx.lookup("QueueConnectionFactory");
                        connection = 
connectionFactory.createQueueConnection();
                        ctx.close();
                        cli = new CLI(connection);
                } catch (Exception e)
                {
                        System.out.println(e);
                        System.exit(-1);
                }
                
                cli.waitForRouter("router1");

                try {
                        cli.executeCommand("sr router1");
                        cli.executeCommand("cc sys$queuemanager/usage");
                        String[] queues = cli.getContextEntities();
                        if (queues != null)
                        {
                                for (int i=0;i<queues.length;i++)
                                        System.out.println("Queue in use: 
"+queues[i]);
                        }
                        cli.close();
                } catch (CLIException e)
                {
                        System.out.println(e.getMessage());
                }
                
                try {
                        connection.close();
                } catch (Exception ignored){}
        }
}


-- 
Andreas Mueller, IIT GmbH, Bremen/Germany, http://www.iit.de
SwiftMQ - JMS Enterprise Messaging System, http://www.swiftmq.com


------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to 
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/developers@mail.iit.de/




Reply via email to