commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/messenger/src/webapp/WEB-INF web.xml subscriptions.xml
Date Tue, 04 Mar 2003 10:21:10 GMT
jstrachan    2003/03/04 02:21:10

  Modified:    messenger/src/java/org/apache/commons/messagelet/impl
                        ServletResponseImpl.java
                        MessageHttpServletDispatcher.java
                        HttpMessageletResponseImpl.java
                        MessageServletDispatcher.java
                        HttpServletResponseImpl.java
                        ServletRequestImpl.java HttpServletRequestImpl.java
                        HttpSessionImpl.java MessageletResponseImpl.java
                        MessageletRequestImpl.java
                        BufferedServletOutputStream.java
                        HttpMessageletRequestImpl.java RequestUtil.java
                        BufferedServletInputStream.java
               messenger/src/java/org/apache/commons/messenger
                        DefaultServerSession.java DefaultMessenger.java
                        MessengerSession.java XAMessenger.java
                        MessengerServlet.java Messenger.java
                        MessengerSupport.java MessengerListenerSupport.java
                        DefaultServerSessionPool.java
                        JNDISessionFactory.java SessionFactory.java
               messenger/src/java/org/apache/commons/messagelet
                        MessageletRequest.java Main.java
                        MessageDrivenObjectSupport.java
                        MessageletResponse.java ConsumerThread.java
                        DistributeBridgeMDO.java SubscriptionManager.java
                        Messagelet.java BridgeMDO.java
                        XAConsumerThread.java ManagerServlet.java
               messenger/src/java/org/apache/commons/messenger/task
                        ConsumerTask.java ProducerTask.java
               messenger/src/java/org/apache/commons/messenger/tool
                        Consumer.java Caller.java Producer.java
                        StopWatchMessageListener.java
               messenger/src/java/org/apache/commons/messagelet/model
                        Subscription.java SubscriptionList.java
               messenger/src/test/org/apache/commons/messenger
                        LoggingMDO.java TestAll.java TestMessenger.java
  Added:       messenger/src/webapp/jms time.jsp
               messenger/src/webapp/WEB-INF/src EchoMessagelet.java
                        EchoServlet.java EchoMDO.java
               messenger/src/webapp/WEB-INF web.xml subscriptions.xml
  Log:
  removed unused imports
  
  Revision  Changes    Path
  1.2       +5 -5      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/ServletResponseImpl.java
  
  Index: ServletResponseImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/ServletResponseImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServletResponseImpl.java	26 Oct 2001 11:52:16 -0000	1.1
  +++ ServletResponseImpl.java	4 Mar 2003 10:20:54 -0000	1.2
  @@ -70,7 +70,7 @@
   import java.io.OutputStreamWriter;
   import java.io.PrintWriter;
   import java.util.Locale;
  -import javax.servlet.ServletException;
  +
   import javax.servlet.ServletOutputStream;
   import javax.servlet.ServletResponse;
   
  
  
  
  1.3       +3 -6      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/MessageHttpServletDispatcher.java
  
  Index: MessageHttpServletDispatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/MessageHttpServletDispatcher.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageHttpServletDispatcher.java	13 Nov 2001 09:42:27 -0000	1.2
  +++ MessageHttpServletDispatcher.java	4 Mar 2003 10:20:55 -0000	1.3
  @@ -9,11 +9,8 @@
    */
   package org.apache.commons.messagelet.impl;
   
  -import javax.jms.Destination;
  -import javax.jms.Message;
  -import javax.jms.MessageListener;
   import javax.jms.JMSException;
  -import javax.servlet.ServletContext;
  +import javax.jms.Message;
   import javax.servlet.ServletException;
   
   import org.apache.commons.messagelet.MessageDrivenObjectSupport;
  
  
  
  1.3       +2 -4      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpMessageletResponseImpl.java
  
  Index: HttpMessageletResponseImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpMessageletResponseImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpMessageletResponseImpl.java	17 May 2002 15:05:44 -0000	1.2
  +++ HttpMessageletResponseImpl.java	4 Mar 2003 10:20:55 -0000	1.3
  @@ -15,8 +15,6 @@
   import javax.jms.Destination;
   import javax.jms.JMSException;
   import javax.jms.Message;
  -import javax.jms.MessageListener;
  -import javax.servlet.ServletException;
   import javax.servlet.ServletOutputStream;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpServletResponseWrapper;
  
  
  
  1.4       +3 -6      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/MessageServletDispatcher.java
  
  Index: MessageServletDispatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/MessageServletDispatcher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MessageServletDispatcher.java	26 Oct 2001 14:27:26 -0000	1.3
  +++ MessageServletDispatcher.java	4 Mar 2003 10:20:55 -0000	1.4
  @@ -9,11 +9,8 @@
    */
   package org.apache.commons.messagelet.impl;
   
  -import javax.jms.Destination;
  -import javax.jms.Message;
  -import javax.jms.MessageListener;
   import javax.jms.JMSException;
  -import javax.servlet.ServletContext;
  +import javax.jms.Message;
   import javax.servlet.ServletException;
   
   import org.apache.commons.messagelet.MessageDrivenObjectSupport;
  
  
  
  1.2       +4 -8      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpServletResponseImpl.java
  
  Index: HttpServletResponseImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpServletResponseImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HttpServletResponseImpl.java	29 Oct 2001 22:32:47 -0000	1.1
  +++ HttpServletResponseImpl.java	4 Mar 2003 10:20:55 -0000	1.2
  @@ -66,17 +66,13 @@
   
   
   import java.io.IOException;
  -import java.io.OutputStream;
  -import java.io.OutputStreamWriter;
  -import java.io.PrintWriter;
   import java.text.SimpleDateFormat;
   import java.util.ArrayList;
   import java.util.Date;
   import java.util.HashMap;
   import java.util.Locale;
   import java.util.TimeZone;
  -import javax.servlet.ServletException;
  -import javax.servlet.ServletOutputStream;
  +
   import javax.servlet.http.Cookie;
   import javax.servlet.http.HttpServletResponse;
   
  
  
  
  1.4       +5 -8      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/ServletRequestImpl.java
  
  Index: ServletRequestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/ServletRequestImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServletRequestImpl.java	30 Oct 2001 11:14:31 -0000	1.3
  +++ ServletRequestImpl.java	4 Mar 2003 10:20:58 -0000	1.4
  @@ -66,21 +66,18 @@
   
   
   import java.io.BufferedReader;
  +import java.io.IOException;
   import java.io.InputStream;
   import java.io.InputStreamReader;
  -import java.io.IOException;
   import java.io.UnsupportedEncodingException;
  -import java.security.Principal;
   import java.util.ArrayList;
   import java.util.Enumeration;
   import java.util.HashMap;
  -import java.util.Iterator;
   import java.util.Locale;
   import java.util.Map;
   
   import javax.servlet.RequestDispatcher;
   import javax.servlet.ServletContext;
  -import javax.servlet.ServletException;
   import javax.servlet.ServletInputStream;
   import javax.servlet.ServletRequest;
   
  
  
  
  1.3       +4 -12     jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpServletRequestImpl.java
  
  Index: HttpServletRequestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpServletRequestImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpServletRequestImpl.java	30 Oct 2001 11:14:31 -0000	1.2
  +++ HttpServletRequestImpl.java	4 Mar 2003 10:20:58 -0000	1.3
  @@ -64,10 +64,6 @@
   
   package org.apache.commons.messagelet.impl;
   
  -import java.io.BufferedReader;
  -import java.io.InputStream;
  -import java.io.InputStreamReader;
  -import java.io.IOException;
   import java.io.UnsupportedEncodingException;
   import java.security.Principal;
   import java.text.ParseException;
  @@ -77,14 +73,10 @@
   import java.util.Date;
   import java.util.Enumeration;
   import java.util.HashMap;
  -import java.util.Iterator;
   import java.util.Locale;
   import java.util.Map;
   
  -import javax.servlet.RequestDispatcher;
   import javax.servlet.ServletContext;
  -import javax.servlet.ServletException;
  -import javax.servlet.ServletInputStream;
   import javax.servlet.http.Cookie;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpSession;
  
  
  
  1.2       +5 -8      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpSessionImpl.java
  
  Index: HttpSessionImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpSessionImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HttpSessionImpl.java	30 Oct 2001 11:14:31 -0000	1.1
  +++ HttpSessionImpl.java	4 Mar 2003 10:20:58 -0000	1.2
  @@ -65,7 +65,6 @@
   package org.apache.commons.messagelet.impl;
   
   
  -import java.beans.PropertyChangeListener;
   import java.beans.PropertyChangeSupport;
   import java.io.IOException;
   import java.io.NotSerializableException;
  @@ -77,16 +76,14 @@
   import java.util.Enumeration;
   import java.util.HashMap;
   import java.util.Iterator;
  +
   import javax.servlet.ServletContext;
  -import javax.servlet.ServletException;
   import javax.servlet.http.HttpSession;
   import javax.servlet.http.HttpSessionActivationListener;
  -import javax.servlet.http.HttpSessionAttributeListener;
   import javax.servlet.http.HttpSessionBindingEvent;
   import javax.servlet.http.HttpSessionBindingListener;
   import javax.servlet.http.HttpSessionContext;
   import javax.servlet.http.HttpSessionEvent;
  -import javax.servlet.http.HttpSessionListener;
   
   import org.apache.commons.collections.IteratorEnumeration;
   
  
  
  
  1.6       +2 -4      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/MessageletResponseImpl.java
  
  Index: MessageletResponseImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/MessageletResponseImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MessageletResponseImpl.java	17 May 2002 15:05:44 -0000	1.5
  +++ MessageletResponseImpl.java	4 Mar 2003 10:20:58 -0000	1.6
  @@ -15,8 +15,6 @@
   import javax.jms.Destination;
   import javax.jms.JMSException;
   import javax.jms.Message;
  -import javax.jms.MessageListener;
  -import javax.servlet.ServletException;
   import javax.servlet.ServletOutputStream;
   import javax.servlet.ServletResponse;
   import javax.servlet.ServletResponseWrapper;
  
  
  
  1.7       +2 -11     jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/MessageletRequestImpl.java
  
  Index: MessageletRequestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/MessageletRequestImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MessageletRequestImpl.java	17 May 2002 15:05:44 -0000	1.6
  +++ MessageletRequestImpl.java	4 Mar 2003 10:20:58 -0000	1.7
  @@ -12,22 +12,13 @@
   import java.io.BufferedReader;
   import java.io.InputStreamReader;
   
  -import java.util.Collections;
  -import java.util.Enumeration;
  -import java.util.HashMap;
  -import java.util.Map;
  -
   import javax.jms.JMSException;
   import javax.jms.Message;
  -import javax.jms.MessageListener;
   import javax.jms.TextMessage;
  -import javax.servlet.RequestDispatcher;
  -import javax.servlet.ServletException;
   import javax.servlet.ServletInputStream;
   import javax.servlet.ServletRequest;
   import javax.servlet.ServletRequestWrapper;
   
  -import org.apache.commons.collections.IteratorEnumeration;
   import org.apache.commons.messagelet.MessageletRequest;
   import org.apache.commons.messenger.Messenger;
   
  
  
  
  1.2       +2 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/BufferedServletOutputStream.java
  
  Index: BufferedServletOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/BufferedServletOutputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BufferedServletOutputStream.java	26 Oct 2001 11:52:16 -0000	1.1
  +++ BufferedServletOutputStream.java	4 Mar 2003 10:20:58 -0000	1.2
  @@ -14,7 +14,6 @@
   import java.io.OutputStream;
   import java.io.UnsupportedEncodingException;
   
  -
   import javax.servlet.ServletOutputStream;
   
   /** 
  
  
  
  1.5       +2 -11     jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpMessageletRequestImpl.java
  
  Index: HttpMessageletRequestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/HttpMessageletRequestImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HttpMessageletRequestImpl.java	17 May 2002 15:05:44 -0000	1.4
  +++ HttpMessageletRequestImpl.java	4 Mar 2003 10:20:58 -0000	1.5
  @@ -12,22 +12,13 @@
   import java.io.BufferedReader;
   import java.io.InputStreamReader;
   
  -import java.util.Collections;
  -import java.util.Enumeration;
  -import java.util.HashMap;
  -import java.util.Map;
  -
   import javax.jms.JMSException;
   import javax.jms.Message;
  -import javax.jms.MessageListener;
   import javax.jms.TextMessage;
  -import javax.servlet.RequestDispatcher;
  -import javax.servlet.ServletException;
   import javax.servlet.ServletInputStream;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletRequestWrapper;
   
  -import org.apache.commons.collections.IteratorEnumeration;
   import org.apache.commons.messagelet.MessageletRequest;
   import org.apache.commons.messenger.Messenger;
   
  
  
  
  1.2       +5 -5      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/RequestUtil.java
  
  Index: RequestUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/RequestUtil.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestUtil.java	30 Oct 2001 11:14:31 -0000	1.1
  +++ RequestUtil.java	4 Mar 2003 10:20:58 -0000	1.2
  @@ -67,9 +67,9 @@
   import java.io.UnsupportedEncodingException;
   import java.text.SimpleDateFormat;
   import java.util.ArrayList;
  -import java.util.Date;
   import java.util.Map;
   import java.util.TimeZone;
  +
   import javax.servlet.http.Cookie;
   
   
  
  
  
  1.2       +1 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/BufferedServletInputStream.java
  
  Index: BufferedServletInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/impl/BufferedServletInputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BufferedServletInputStream.java	29 Oct 2001 22:32:47 -0000	1.1
  +++ BufferedServletInputStream.java	4 Mar 2003 10:20:58 -0000	1.2
  @@ -12,8 +12,6 @@
   import java.io.ByteArrayInputStream;
   import java.io.IOException;
   import java.io.InputStream;
  -import java.io.UnsupportedEncodingException;
  -
   
   import javax.servlet.ServletInputStream;
   
  
  
  
  1.3       +3 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/DefaultServerSession.java
  
  Index: DefaultServerSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/DefaultServerSession.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultServerSession.java	17 May 2002 15:05:45 -0000	1.2
  +++ DefaultServerSession.java	4 Mar 2003 10:20:59 -0000	1.3
  @@ -10,8 +10,8 @@
   package org.apache.commons.messenger;
   
   import javax.jms.JMSException;
  -import javax.jms.Session;
   import javax.jms.ServerSession;
  +import javax.jms.Session;
   
   
   /** <p><code>DefaultServerSession</code> is a default implementation of
  
  
  
  1.14      +5 -11     jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/DefaultMessenger.java
  
  Index: DefaultMessenger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/DefaultMessenger.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DefaultMessenger.java	8 Nov 2002 14:54:25 -0000	1.13
  +++ DefaultMessenger.java	4 Mar 2003 10:20:59 -0000	1.14
  @@ -9,23 +9,17 @@
    */
   package org.apache.commons.messenger;
   
  -import java.lang.ThreadLocal; // for javadoc
  -import java.io.Serializable;
  -
   import javax.jms.Connection;
   import javax.jms.ConnectionFactory;
   import javax.jms.JMSException;
  -import javax.jms.Message;
  -import javax.jms.MessageConsumer;
   import javax.jms.MessageListener;
   import javax.jms.MessageProducer;
  +import javax.jms.Queue;
  +import javax.jms.QueueSession;
   import javax.jms.ServerSessionPool;
   import javax.jms.Session;
  -import javax.jms.Queue;
   import javax.jms.Topic;
  -import javax.jms.QueueSession;
   import javax.jms.TopicSession;
  -import javax.naming.NamingException;
   import javax.naming.Context;
   
   import org.apache.commons.logging.Log;
  @@ -78,7 +72,7 @@
           return getSessionFactory().createServerSessionPool(messageListener, maxThreads);
       }
       
  -    public void close() throws JMSException {
  +    public synchronized void close() throws JMSException {
           try {
               getSessionFactory().close();
           }
  
  
  
  1.6       +0 -6      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/MessengerSession.java
  
  Index: MessengerSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/MessengerSession.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MessengerSession.java	4 Dec 2002 10:13:35 -0000	1.5
  +++ MessengerSession.java	4 Mar 2003 10:20:59 -0000	1.6
  @@ -14,19 +14,13 @@
   
   import javax.jms.Destination;
   import javax.jms.JMSException;
  -import javax.jms.Message;
   import javax.jms.MessageConsumer;
  -import javax.jms.MessageListener;
   import javax.jms.MessageProducer;
   import javax.jms.Queue;
  -import javax.jms.QueueConnection;
   import javax.jms.QueueRequestor;
  -import javax.jms.QueueSender;
   import javax.jms.QueueSession;
   import javax.jms.Session;
   import javax.jms.Topic;
  -import javax.jms.TopicConnection;
  -import javax.jms.TopicPublisher;
   import javax.jms.TopicRequestor;
   import javax.jms.TopicSession;
   
  
  
  
  1.3       +0 -1      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/XAMessenger.java
  
  Index: XAMessenger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/XAMessenger.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XAMessenger.java	4 Dec 2002 10:13:35 -0000	1.2
  +++ XAMessenger.java	4 Mar 2003 10:20:59 -0000	1.3
  @@ -14,7 +14,6 @@
   import javax.transaction.Transaction;
   import javax.transaction.xa.XAResource;
   
  -
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  
  
  
  1.4       +3 -4      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/MessengerServlet.java
  
  Index: MessengerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/MessengerServlet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MessengerServlet.java	17 May 2002 15:05:45 -0000	1.3
  +++ MessengerServlet.java	4 Mar 2003 10:20:59 -0000	1.4
  @@ -12,16 +12,15 @@
   import java.io.BufferedReader;
   import java.io.IOException;
   import java.io.PrintWriter;
  -import java.io.PrintWriter;
   
   import javax.jms.Destination;
   import javax.jms.JMSException;
   import javax.jms.Message;
   import javax.jms.TextMessage;
   import javax.servlet.ServletException;
  +import javax.servlet.http.HttpServlet;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
  -import javax.servlet.http.HttpServlet;
   
   
   /** <p><code>MessengerServlet</code> is a simple servlet that
  
  
  
  1.15      +4 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/Messenger.java
  
  Index: Messenger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/Messenger.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Messenger.java	8 Nov 2002 14:54:25 -0000	1.14
  +++ Messenger.java	4 Mar 2003 10:21:00 -0000	1.15
  @@ -10,6 +10,7 @@
   package org.apache.commons.messenger;
   
   import java.io.Serializable;
  +
   import javax.jms.BytesMessage;
   import javax.jms.Connection;
   import javax.jms.ConnectionConsumer;
  @@ -21,9 +22,9 @@
   import javax.jms.MessageListener;
   import javax.jms.ObjectMessage;
   import javax.jms.QueueBrowser;
  +import javax.jms.ServerSessionPool;
   import javax.jms.Session;
   import javax.jms.StreamMessage;
  -import javax.jms.ServerSessionPool;
   import javax.jms.TextMessage;
   
   /** <p><code>Messenger</code> a facade over the JMS API making it easy to use JMS
  
  
  
  1.34      +4 -6      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/MessengerSupport.java
  
  Index: MessengerSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/MessengerSupport.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- MessengerSupport.java	28 Nov 2002 15:01:27 -0000	1.33
  +++ MessengerSupport.java	4 Mar 2003 10:21:00 -0000	1.34
  @@ -27,19 +27,17 @@
   import javax.jms.MessageProducer;
   import javax.jms.ObjectMessage;
   import javax.jms.Queue;
  -import javax.jms.QueueConnection;
   import javax.jms.QueueBrowser;
  -import javax.jms.QueueRequestor;
  +import javax.jms.QueueConnection;
   import javax.jms.QueueSender;
   import javax.jms.QueueSession;
  +import javax.jms.ServerSessionPool;
   import javax.jms.Session;
   import javax.jms.StreamMessage;
  -import javax.jms.ServerSessionPool;
   import javax.jms.TextMessage;
   import javax.jms.Topic;
   import javax.jms.TopicConnection;
   import javax.jms.TopicPublisher;
  -import javax.jms.TopicRequestor;
   import javax.jms.TopicSession;
   
   import org.apache.commons.logging.Log;
  
  
  
  1.3       +3 -4      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/MessengerListenerSupport.java
  
  Index: MessengerListenerSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/MessengerListenerSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessengerListenerSupport.java	17 May 2002 15:05:45 -0000	1.2
  +++ MessengerListenerSupport.java	4 Mar 2003 10:21:01 -0000	1.3
  @@ -9,7 +9,6 @@
    */
   package org.apache.commons.messenger;
   
  -import javax.jms.MessageListener;
   
   /** 
    * <p><code>MessengerListenerSupport</code> is an abstract base
  @@ -31,7 +30,7 @@
        * Messenger via the addListener() method to associate
        * this MessageListener with a Messenger instance..
        */
  -    public void setMessenger(Messenger messager) {
  +    public void setMessenger(Messenger messenger) {
           this.messenger = messenger;
       }
       
  
  
  
  1.4       +3 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/DefaultServerSessionPool.java
  
  Index: DefaultServerSessionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/DefaultServerSessionPool.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultServerSessionPool.java	17 May 2002 15:05:45 -0000	1.3
  +++ DefaultServerSessionPool.java	4 Mar 2003 10:21:01 -0000	1.4
  @@ -14,9 +14,9 @@
   import javax.jms.JMSException;
   import javax.jms.Message;
   import javax.jms.MessageListener;
  -import javax.jms.Session;
   import javax.jms.ServerSession;
   import javax.jms.ServerSessionPool;
  +import javax.jms.Session;
   
   
   /** <p><code>DefaultServerSessionPool</code> is a default implementation of
  
  
  
  1.7       +6 -11     jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/JNDISessionFactory.java
  
  Index: JNDISessionFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/JNDISessionFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JNDISessionFactory.java	17 May 2002 15:05:45 -0000	1.6
  +++ JNDISessionFactory.java	4 Mar 2003 10:21:01 -0000	1.7
  @@ -9,22 +9,17 @@
    */
   package org.apache.commons.messenger;
   
  -import java.io.Serializable;
  -import java.util.Properties;
  -
  -import javax.jms.ConnectionFactory;
   import javax.jms.Connection;
  +import javax.jms.ConnectionFactory;
  +import javax.jms.JMSException;
  +import javax.jms.QueueConnection;
  +import javax.jms.QueueConnectionFactory;
   import javax.jms.Session;
   import javax.jms.TopicConnection;
  -import javax.jms.QueueConnection;
   import javax.jms.TopicConnectionFactory;
  -import javax.jms.QueueConnectionFactory;
  -import javax.jms.JMSException;
  -
   import javax.naming.Context;
   import javax.naming.InitialContext;
   import javax.naming.NamingException;
  -import javax.naming.NamingEnumeration;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  
  
  
  1.17      +5 -5      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/SessionFactory.java
  
  Index: SessionFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/SessionFactory.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SessionFactory.java	4 Dec 2002 10:02:09 -0000	1.16
  +++ SessionFactory.java	4 Mar 2003 10:21:01 -0000	1.17
  @@ -9,7 +9,6 @@
    */
   package org.apache.commons.messenger;
   
  -import java.io.Serializable;
   import java.util.Properties;
   
   import javax.jms.Connection;
  @@ -122,10 +121,11 @@
       }
   
       /** Closes the JMS Connection that this object is using, if any */
  -    public void close() throws JMSException {
  +    public synchronized void close() throws JMSException {
           if (connection != null) {
  -            connection.close();
  +            Connection tmp = connection;
               connection = null;
  +            tmp.close();
           }
       }
   
  
  
  
  1.1                  jakarta-commons-sandbox/messenger/src/webapp/jms/time.jsp
  
  Index: time.jsp
  ===================================================================
  <echo>
    <time><%= new java.util.Date() %></time>
    <a><%= request.getParameter( "a" )%></a>
    <b><%= request.getParameter( "b" )%></b>
  
    <message><%= request.getAttribute( "message" )%></message>
  </echo>
  
  
  
  1.3       +2 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/MessageletRequest.java
  
  Index: MessageletRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/MessageletRequest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageletRequest.java	17 May 2002 15:05:46 -0000	1.2
  +++ MessageletRequest.java	4 Mar 2003 10:21:06 -0000	1.3
  @@ -9,7 +9,6 @@
    */
   package org.apache.commons.messagelet;
   
  -import javax.jms.JMSException;
   import javax.jms.Message;
   import javax.servlet.ServletRequest;
   
  
  
  
  1.8       +0 -10     jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/Main.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Main.java	4 Dec 2002 10:13:35 -0000	1.7
  +++ Main.java	4 Mar 2003 10:21:06 -0000	1.8
  @@ -9,27 +9,17 @@
    */
   package org.apache.commons.messagelet;
   
  -import java.net.URL;
   import java.util.Iterator;
   
  -import javax.jms.Destination;
  -import javax.jms.Message;
  -import javax.jms.MessageConsumer;
  -import javax.jms.MessageListener;
   import javax.jms.JMSException;
  -
   import javax.servlet.ServletContext;
  -import javax.servlet.ServletException;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -
  -import org.apache.commons.messagelet.model.Subscription;
   import org.apache.commons.messagelet.model.SubscriptionDigester;
   import org.apache.commons.messagelet.model.SubscriptionList;
   import org.apache.commons.messenger.Messenger;
   import org.apache.commons.messenger.MessengerManager;
  -import org.apache.commons.messenger.tool.StopWatchMessageListener;
   
   /** 
    * <p><code>Main</code> is a simple command line program that will
  
  
  
  1.5       +2 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/MessageDrivenObjectSupport.java
  
  Index: MessageDrivenObjectSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/MessageDrivenObjectSupport.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MessageDrivenObjectSupport.java	28 Aug 2002 15:27:29 -0000	1.4
  +++ MessageDrivenObjectSupport.java	4 Mar 2003 10:21:06 -0000	1.5
  @@ -9,7 +9,6 @@
    */
   package org.apache.commons.messagelet;
   
  -import javax.jms.MessageListener;
   import javax.servlet.ServletContext;
   import javax.servlet.ServletException;
   
  
  
  
  1.3       +2 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/MessageletResponse.java
  
  Index: MessageletResponse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/MessageletResponse.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageletResponse.java	17 May 2002 15:05:46 -0000	1.2
  +++ MessageletResponse.java	4 Mar 2003 10:21:06 -0000	1.3
  @@ -12,7 +12,6 @@
   import javax.jms.Destination;
   import javax.jms.JMSException;
   import javax.jms.Message;
  -import javax.jms.MessageListener;
   import javax.servlet.ServletResponse;
   
   import org.apache.commons.messenger.Messenger;
  
  
  
  1.4       +1 -2      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/ConsumerThread.java
  
  Index: ConsumerThread.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/ConsumerThread.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConsumerThread.java	4 Dec 2002 10:13:35 -0000	1.3
  +++ ConsumerThread.java	4 Mar 2003 10:21:06 -0000	1.4
  @@ -10,14 +10,13 @@
   package org.apache.commons.messagelet;
   
   import javax.jms.Destination;
  +import javax.jms.JMSException;
   import javax.jms.Message;
   import javax.jms.MessageConsumer;
   import javax.jms.MessageListener;
  -import javax.jms.JMSException;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -
   import org.apache.commons.messenger.Messenger;
   
   /** 
  
  
  
  1.4       +0 -5      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/DistributeBridgeMDO.java
  
  Index: DistributeBridgeMDO.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/DistributeBridgeMDO.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DistributeBridgeMDO.java	4 Dec 2002 10:13:35 -0000	1.3
  +++ DistributeBridgeMDO.java	4 Mar 2003 10:21:06 -0000	1.4
  @@ -10,19 +10,14 @@
   package org.apache.commons.messagelet;
   
   import java.util.ArrayList;
  -import java.util.Iterator;
   import java.util.List;
   
   import javax.jms.Destination;
   import javax.jms.JMSException;
  -import javax.jms.Message;
   import javax.servlet.ServletException;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -
  -import org.apache.commons.messenger.Messenger;
  -import org.apache.commons.messenger.MessengerManager;
   
   
   /** 
  
  
  
  1.3       +1 -5      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/SubscriptionManager.java
  
  Index: SubscriptionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/SubscriptionManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SubscriptionManager.java	4 Dec 2002 10:13:35 -0000	1.2
  +++ SubscriptionManager.java	4 Mar 2003 10:21:06 -0000	1.3
  @@ -12,17 +12,13 @@
   import java.util.Iterator;
   
   import javax.jms.Destination;
  -import javax.jms.Message;
  -import javax.jms.MessageConsumer;
  -import javax.jms.MessageListener;
   import javax.jms.JMSException;
  -
  +import javax.jms.MessageListener;
   import javax.servlet.ServletContext;
   import javax.servlet.ServletException;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -
   import org.apache.commons.messagelet.model.Subscription;
   import org.apache.commons.messagelet.model.SubscriptionList;
   import org.apache.commons.messenger.Messenger;
  
  
  
  1.3       +2 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/Messagelet.java
  
  Index: Messagelet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/Messagelet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Messagelet.java	17 May 2002 15:05:46 -0000	1.2
  +++ Messagelet.java	4 Mar 2003 10:21:06 -0000	1.3
  @@ -13,7 +13,6 @@
   
   import javax.jms.JMSException;
   import javax.servlet.GenericServlet;
  -import javax.servlet.ServletContext;
   import javax.servlet.ServletException;
   import javax.servlet.ServletRequest;
   import javax.servlet.ServletResponse;
  
  
  
  1.7       +0 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/BridgeMDO.java
  
  Index: BridgeMDO.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/BridgeMDO.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- BridgeMDO.java	4 Dec 2002 10:13:35 -0000	1.6
  +++ BridgeMDO.java	4 Mar 2003 10:21:06 -0000	1.7
  @@ -17,16 +17,13 @@
   import javax.jms.MapMessage;
   import javax.jms.Message;
   import javax.jms.ObjectMessage;
  -import javax.jms.Session;
   import javax.jms.StreamMessage;
   import javax.jms.TextMessage;
   import javax.servlet.ServletException;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -
   import org.apache.commons.messenger.Messenger;
  -import org.apache.commons.messenger.MessengerManager;
   
   
   /** <p><code>BridgeMDO</code> is an MDO which implements a JMS bridge
  
  
  
  1.5       +0 -7      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/XAConsumerThread.java
  
  Index: XAConsumerThread.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/XAConsumerThread.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XAConsumerThread.java	4 Dec 2002 10:13:35 -0000	1.4
  +++ XAConsumerThread.java	4 Mar 2003 10:21:07 -0000	1.5
  @@ -9,13 +9,7 @@
    */
   package org.apache.commons.messagelet;
   
  -import javax.jms.Message;
  -import javax.jms.MessageConsumer;
   import javax.jms.MessageListener;
  -import javax.jms.JMSException;
  -import javax.jms.Session;
  -import javax.jms.XASession;
  -
   import javax.transaction.SystemException;
   import javax.transaction.Transaction;
   import javax.transaction.TransactionManager;
  @@ -23,7 +17,6 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -
   import org.apache.commons.messenger.Messenger;
   import org.apache.commons.messenger.XACapable;
   import org.apache.commons.messenger.XACapableAdapter;
  
  
  
  1.15      +2 -10     jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/ManagerServlet.java
  
  Index: ManagerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/ManagerServlet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ManagerServlet.java	21 Oct 2002 20:31:27 -0000	1.14
  +++ ManagerServlet.java	4 Mar 2003 10:21:07 -0000	1.15
  @@ -12,20 +12,12 @@
   import java.net.URL;
   import java.util.Iterator;
   
  -import javax.jms.Destination;
  -import javax.jms.Message;
  -import javax.jms.MessageConsumer;
  -import javax.jms.MessageListener;
   import javax.jms.JMSException;
   import javax.servlet.GenericServlet;
  -import javax.servlet.ServletContext;
   import javax.servlet.ServletException;
   import javax.servlet.ServletRequest;
   import javax.servlet.ServletResponse;
   
  -import org.apache.commons.messagelet.impl.MessageServletDispatcher;
  -import org.apache.commons.messagelet.impl.MessageHttpServletDispatcher;
  -import org.apache.commons.messagelet.model.Subscription;
   import org.apache.commons.messagelet.model.SubscriptionDigester;
   import org.apache.commons.messagelet.model.SubscriptionList;
   import org.apache.commons.messenger.Messenger;
  
  
  
  1.3       +1 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/task/ConsumerTask.java
  
  Index: ConsumerTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/task/ConsumerTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConsumerTask.java	4 Dec 2002 10:13:36 -0000	1.2
  +++ ConsumerTask.java	4 Mar 2003 10:21:08 -0000	1.3
  @@ -12,7 +12,6 @@
   import java.io.File;
   import java.io.FileWriter;
   import java.io.IOException;
  -import java.util.Iterator;
   
   import javax.jms.Destination;
   import javax.jms.JMSException;
  @@ -21,10 +20,9 @@
   
   import org.apache.commons.messenger.Messenger;
   import org.apache.commons.messenger.MessengerManager;
  -
  -import org.apache.tools.ant.Task;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.Task;
   
   /** 
    * <p><code>ConsumerTask</code> is an Ant task which will 
  
  
  
  1.6       +4 -9      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/task/ProducerTask.java
  
  Index: ProducerTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/task/ProducerTask.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProducerTask.java	2 Oct 2002 15:00:05 -0000	1.5
  +++ ProducerTask.java	4 Mar 2003 10:21:08 -0000	1.6
  @@ -19,19 +19,14 @@
   
   import javax.jms.Destination;
   import javax.jms.JMSException;
  -import javax.jms.Message;
   import javax.jms.TextMessage;
   
   import org.apache.commons.messenger.Messenger;
   import org.apache.commons.messenger.MessengerManager;
  -
  -import org.apache.tools.ant.Task;
   import org.apache.tools.ant.BuildException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.DirectoryScanner;
  +import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.FileSet;
  -import org.apache.tools.ant.types.FilterSet;
  -import org.apache.tools.ant.util.FileUtils;
   
   /** 
    * <p><code>ProducerTask</code> is an Ant task which will 
  @@ -281,7 +276,7 @@
       protected void sleep() {
           if ( sleep > 0 ) {
               try {
  -                Thread.currentThread().sleep(sleep);
  +                Thread.sleep(sleep);
               }
               catch (InterruptedException e) {
                   // ignore interuptions
  
  
  
  1.4       +2 -4      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/tool/Consumer.java
  
  Index: Consumer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/tool/Consumer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Consumer.java	17 May 2002 15:05:47 -0000	1.3
  +++ Consumer.java	4 Mar 2003 10:21:09 -0000	1.4
  @@ -9,9 +9,7 @@
    */
   package org.apache.commons.messenger.tool;
   
  -import java.io.File;
   import java.io.FileWriter;
  -import java.io.IOException;
   import java.io.OutputStreamWriter;
   import java.io.PrintWriter;
   import java.io.Writer;
  
  
  
  1.4       +2 -7      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/tool/Caller.java
  
  Index: Caller.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/tool/Caller.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Caller.java	17 May 2002 15:05:47 -0000	1.3
  +++ Caller.java	4 Mar 2003 10:21:09 -0000	1.4
  @@ -9,11 +9,8 @@
    */
   package org.apache.commons.messenger.tool;
   
  -import java.io.BufferedReader;
  -import java.io.File;
   import java.io.FileReader;
   import java.io.FileWriter;
  -import java.io.IOException;
   import java.io.InputStreamReader;
   import java.io.OutputStreamWriter;
   import java.io.PrintWriter;
  @@ -23,10 +20,8 @@
   import javax.jms.Destination;
   import javax.jms.JMSException;
   import javax.jms.Message;
  -import javax.jms.MessageConsumer;
   import javax.jms.TextMessage;
   
  -import org.apache.commons.messenger.Messenger;
   import org.apache.commons.messenger.MessengerManager;
   
   /** <p><code>Caller</code> is a sample program that 
  
  
  
  1.5       +2 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/tool/Producer.java
  
  Index: Producer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/tool/Producer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Producer.java	17 May 2002 15:05:47 -0000	1.4
  +++ Producer.java	4 Mar 2003 10:21:09 -0000	1.5
  @@ -10,7 +10,6 @@
   package org.apache.commons.messenger.tool;
   
   import java.io.BufferedReader;
  -import java.io.File;
   import java.io.FileReader;
   import java.io.IOException;
   import java.io.InputStreamReader;
  
  
  
  1.6       +1 -1      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/tool/StopWatchMessageListener.java
  
  Index: StopWatchMessageListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/tool/StopWatchMessageListener.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StopWatchMessageListener.java	4 Dec 2002 10:13:36 -0000	1.5
  +++ StopWatchMessageListener.java	4 Mar 2003 10:21:09 -0000	1.6
  @@ -63,7 +63,7 @@
               double timePerMessage = elapsed;
               timePerMessage /= count;
               
  -            double messagesPerSecond = groupSize; 
  +            double messagesPerSecond = 1000; 
               messagesPerSecond /= timePerMessage;
               
               Destination destination = null;
  
  
  
  1.4       +0 -5      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/model/Subscription.java
  
  Index: Subscription.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/model/Subscription.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Subscription.java	4 Dec 2002 10:13:35 -0000	1.3
  +++ Subscription.java	4 Mar 2003 10:21:09 -0000	1.4
  @@ -9,14 +9,9 @@
    */
   package org.apache.commons.messagelet.model;
   
  -import javax.jms.Destination;
  -import javax.jms.JMSException;
   import javax.jms.MessageListener;
   
   import org.apache.commons.messagelet.ConsumerThread;
  -
  -import org.apache.commons.messenger.Messenger;
  -import org.apache.commons.messenger.MessengerManager;
   
   /** <p><code>SubscriptionList</code> a bean used by the digester to 
     * create a list of JMS subscriptions.</p>
  
  
  
  1.3       +0 -3      jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/model/SubscriptionList.java
  
  Index: SubscriptionList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/model/SubscriptionList.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SubscriptionList.java	4 Dec 2002 10:13:35 -0000	1.2
  +++ SubscriptionList.java	4 Mar 2003 10:21:09 -0000	1.3
  @@ -10,10 +10,7 @@
   package org.apache.commons.messagelet.model;
   
   import java.util.ArrayList;
  -import java.util.Iterator;
   import java.util.List;
  -
  -import javax.jms.JMSException;
   
   /** <p><code>SubscriptionList</code> a bean used by the digester to 
     * create a list of JMS subscriptions.</p>
  
  
  
  1.3       +0 -2      jakarta-commons-sandbox/messenger/src/test/org/apache/commons/messenger/LoggingMDO.java
  
  Index: LoggingMDO.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/test/org/apache/commons/messenger/LoggingMDO.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LoggingMDO.java	4 Dec 2002 10:13:35 -0000	1.2
  +++ LoggingMDO.java	4 Mar 2003 10:21:09 -0000	1.3
  @@ -13,9 +13,7 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -
   import org.apache.commons.messagelet.MessengerMDO;
  -import org.apache.commons.messenger.Messenger;
   
   /** 
    * <p><code>LoggingMDO</code> is a simple MDO which
  
  
  
  1.2       +4 -2      jakarta-commons-sandbox/messenger/src/test/org/apache/commons/messenger/TestAll.java
  
  Index: TestAll.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/test/org/apache/commons/messenger/TestAll.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestAll.java	24 Aug 2001 14:20:28 -0000	1.1
  +++ TestAll.java	4 Mar 2003 10:21:09 -0000	1.2
  @@ -9,7 +9,9 @@
    */
   package org.apache.commons.messenger;
   
  -import junit.framework.*;
  +import junit.framework.Test;
  +import junit.framework.TestCase;
  +import junit.framework.TestSuite;
   
   /** Entry point for all JUnit tests.
     *
  
  
  
  1.5       +9 -8      jakarta-commons-sandbox/messenger/src/test/org/apache/commons/messenger/TestMessenger.java
  
  Index: TestMessenger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/test/org/apache/commons/messenger/TestMessenger.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestMessenger.java	17 May 2002 15:05:47 -0000	1.4
  +++ TestMessenger.java	4 Mar 2003 10:21:09 -0000	1.5
  @@ -9,7 +9,6 @@
    */
   package org.apache.commons.messenger;
   
  -import java.io.StringWriter;
   import java.util.ArrayList;
   import java.util.List;
   
  @@ -17,7 +16,9 @@
   import javax.jms.Message;
   import javax.jms.TextMessage;
   
  -import junit.framework.*;
  +import junit.framework.Test;
  +import junit.framework.TestCase;
  +import junit.framework.TestSuite;
   import junit.textui.TestRunner;
   
   
  @@ -80,7 +81,7 @@
           
           log( "sleeping to let the receive thread start" );
           
  -        Thread.currentThread().sleep( waitTime );
  +        Thread.sleep( waitTime );
           
           log( "sending topic message" );
           
  @@ -90,7 +91,7 @@
           
           log( "sleeping" );
           
  -        Thread.currentThread().sleep( waitTime );
  +        Thread.sleep( waitTime );
           
           assertTrue( "Have received the topic message", receivedTopicMessage );
       }
  @@ -115,7 +116,7 @@
           
           log( "sleeping to let the receive thread start" );
           
  -        Thread.currentThread().sleep( waitTime );
  +        Thread.sleep( waitTime );
           
           log( "sending queue message" );
           
  @@ -125,7 +126,7 @@
           
           log( "sleeping" );
           
  -        Thread.currentThread().sleep( waitTime );
  +        Thread.sleep( waitTime );
           
           assertTrue( "Have received the queue message", receivedQueueMessage );
       }
  
  
  
  1.1                  jakarta-commons-sandbox/messenger/src/webapp/WEB-INF/src/EchoMessagelet.java
  
  Index: EchoMessagelet.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   * 
   * $Id: EchoMessagelet.java,v 1.1 2003/03/04 10:21:09 jstrachan Exp $
   */
  
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.PrintWriter;
  import java.util.Date;
  
  import javax.jms.Destination;
  import javax.jms.JMSException;
  import javax.jms.Message;
  import javax.servlet.ServletException;
  
  import org.apache.commons.messagelet.Messagelet;
  import org.apache.commons.messagelet.MessageletRequest;
  import org.apache.commons.messagelet.MessageletResponse;
  
  //import org.apache.commons.messenger.Messenger;
  
  /** <p><code>EchoMessagelet</code> is an example
    * Messagelet which is a JMS specific servlet allowing access
    * to the usual Servlet APIs as well as the JMS message properties.</p>
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision: 1.1 $
    */
  public class EchoMessagelet extends Messagelet {
  
      public void service( MessageletRequest request, MessageletResponse response ) throws JMSException, IOException, ServletException {
          Message message = request.getMessage();
          
          PrintWriter writer = response.getWriter();
          
          writer.print( "Received message: " );
          writer.print( message.getJMSMessageID() );
          writer.print( " at: " );
          writer.print( new Date() );
          writer.println();
          
          // output the current request
          BufferedReader reader = request.getReader();
          for ( String line; (line = reader.readLine()) != null; ) {
              writer.println( line );
          }
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/messenger/src/webapp/WEB-INF/src/EchoServlet.java
  
  Index: EchoServlet.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   * 
   * $Id: EchoServlet.java,v 1.1 2003/03/04 10:21:09 jstrachan Exp $
   */
  
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.PrintWriter;
  import java.util.Date;
  
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletException;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  
  /** <p><code>EchoServlet</code> is a simple echo generic
    * servlet that can be used to process HTTP or JMS requests
    * based purely in the input and output streams and use of
    * servlet attributes.</p>
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision: 1.1 $
    */
  public class EchoServlet extends GenericServlet {
  
      public void service( ServletRequest request, ServletResponse response ) throws IOException, ServletException {
          PrintWriter writer = response.getWriter();
          
          writer.print( "Received request at: " );
          writer.print( new Date() );
          writer.println();
          
          // output the current request
          BufferedReader reader = request.getReader();
          for ( String line; (line = reader.readLine()) != null; ) {
              writer.println( line );
          }
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/messenger/src/webapp/WEB-INF/src/EchoMDO.java
  
  Index: EchoMDO.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   * 
   * $Id: EchoMDO.java,v 1.1 2003/03/04 10:21:09 jstrachan Exp $
   */
  
  import javax.jms.Destination;
  import javax.jms.JMSException;
  import javax.jms.Message;
  import org.apache.commons.messagelet.MessengerMDO;
  import org.apache.commons.messenger.Messenger;
  
  /** <p><code>EchoMDO</code> is a simple echo MDO which
    * replies with a piece of text.</p>
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision: 1.1 $
    */
  public class EchoMDO extends MessengerMDO {
      
      public void onMessage(Message message) {
          Destination destination = null;
          try {
              destination = message.getJMSReplyTo();
          }
          catch (JMSException e) {
              log("Could not find replyTo Destination for message: " + message, e);
              return;
          }
          if (destination == null) {
              log("No replyTo Destination for message: " + message);
              return;
          }
          
          Messenger messenger = getMessenger();
          String text = "Received: " + message;
          
          try {
              Message reply = messenger.createTextMessage(text);
              messenger.send(destination, reply);
          }
          catch (Exception e) {
              log("Could not send reply", e);
          }
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/messenger/src/webapp/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!DOCTYPE web-app 
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 
      "http://java.sun.com/dtd/web-app_2_3.dtd">
  <web-app>
  
    <display-name>Messenger example web app</display-name>
  
    <description>This web application demonstrates the use of Messenger, MessageDrivenObjects and Messagelets</description>
  
    <servlet>
      <servlet-name>managerServlet</servlet-name>
      <servlet-class>org.apache.commons.messagelet.ManagerServlet</servlet-class>
      <init-param>
        <param-name>connections</param-name>
        <param-value>/WEB-INF/Messenger.xml</param-value>
      </init-param> 
      <init-param>
        <param-name>subscriptions</param-name>
        <param-value>/WEB-INF/subscriptions.xml</param-value>
      </init-param> 
      <load-on-startup>1</load-on-startup> 
    </servlet>
  
    <servlet>
      <servlet-name>echoMessagelet</servlet-name>
      <servlet-class>EchoMessagelet</servlet-class>
      <load-on-startup>1</load-on-startup> 
    </servlet>
  
    <servlet>
      <servlet-name>echoServlet</servlet-name>
      <servlet-class>EchoServlet</servlet-class>
      <load-on-startup>1</load-on-startup> 
    </servlet>
  
  
    <servlet-mapping>
      <servlet-name>echoMessagelet</servlet-name>
      <url-pattern>/jms/echoMessagelet</url-pattern>
    </servlet-mapping>
  
    <servlet-mapping>
      <servlet-name>echoServlet</servlet-name>
      <url-pattern>/jms/echoServlet</url-pattern>
    </servlet-mapping>
  
    <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
  
  </web-app>
  
  
  
  1.1                  jakarta-commons-sandbox/messenger/src/webapp/WEB-INF/subscriptions.xml
  
  Index: subscriptions.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <subscriptions>
    <subscription connection="queue" subject="jms/Queue">
      <listener className="EchoMDO"/>
    </subscription>
    
    <subscription connection="queue" subject="echo.servlet">
      <servlet>/jms/echoServlet</servlet>
    </subscription>
    
    <subscription connection="queue" subject="echo.messagelet">
      <servlet>/jms/echoMessagelet</servlet>
    </subscription>
    
    <subscription connection="queue" subject="echo.jsp">
      <servlet>/jms/time.jsp?a=1&amp;b=2</servlet>
    </subscription>
    
    <subscription connection="queue" subject="foo.input">
  
      <bridge outputConnection="queue" outputSubject="foo.output"/>
  
    </subscription>
  
    
  </subscriptions>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message