You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by st...@apache.org on 2006/09/20 16:25:08 UTC

svn commit: r448211 - in /incubator/qpid/trunk/qpid/java: broker/test/ client/src/org/apache/qpid/client/ client/src/org/apache/qpid/jms/ client/test/

Author: steshaw
Date: Wed Sep 20 07:25:07 2006
New Revision: 448211

URL: http://svn.apache.org/viewvc?view=rev&rev=448211
Log:
Closeable's checkNotClosed now throws a javax.jms.IllegalStateException rather than a java.lang.IllegalStateException.

Modified:
    incubator/qpid/trunk/qpid/java/broker/test/   (props changed)
    incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQConnection.java
    incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQSession.java
    incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/BasicMessageProducer.java
    incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/Closeable.java
    incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/Connection.java
    incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/MessageProducer.java
    incubator/qpid/trunk/qpid/java/client/test/   (props changed)

Propchange: incubator/qpid/trunk/qpid/java/broker/test/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Sep 20 07:25:07 2006
@@ -0,0 +1 @@
+TEST-org.apache.qpid.server.UnitTests.txt

Modified: incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQConnection.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQConnection.java?view=diff&rev=448211&r1=448210&r2=448211
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQConnection.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQConnection.java Wed Sep 20 07:25:07 2006
@@ -658,7 +658,7 @@
         return null;
     }
 
-    public long getMaximumChannelCount()
+    public long getMaximumChannelCount() throws JMSException
     {
         checkNotClosed();
         return _maximumChannelCount;
@@ -676,7 +676,6 @@
 
     public void setMaximumChannelCount(long maximumChannelCount)
     {
-        checkNotClosed();
         _maximumChannelCount = maximumChannelCount;
     }
 
@@ -879,7 +878,7 @@
      * For all sessions, and for all consumers in those sessions, resubscribe. This is called during failover handling.
      * The caller must hold the failover mutex before calling this method.
      */
-    public void resubscribeSessions() throws AMQException
+    public void resubscribeSessions() throws JMSException, AMQException
     {
         ArrayList sessions = new ArrayList(_sessions.values());
         _logger.info(MessageFormat.format("Resubscribing sessions = {0} sessions.size={1}", sessions, sessions.size())); // FIXME: remove?

Modified: incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQSession.java?view=diff&rev=448211&r1=448210&r2=448211
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQSession.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/AMQSession.java Wed Sep 20 07:25:07 2006
@@ -381,11 +381,11 @@
         }
     }
 
-    public boolean getTransacted()
-    {
-        checkNotClosed();
-        return _transacted;
-    }
+   public boolean getTransacted() throws JMSException
+   {
+       checkNotClosed();
+       return _transacted;
+   }
 
     public int getAcknowledgeMode() throws JMSException
     {
@@ -680,7 +680,7 @@
     {
         return (org.apache.qpid.jms.MessageProducer) new FailoverSupport()
         {
-            public Object operation()
+            public Object operation() throws JMSException
             {
                 checkNotClosed();
 

Modified: incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/BasicMessageProducer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/BasicMessageProducer.java?view=diff&rev=448211&r1=448210&r2=448211
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/BasicMessageProducer.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/BasicMessageProducer.java Wed Sep 20 07:25:07 2006
@@ -466,13 +466,13 @@
         return bodies;
     }
 
-    public void setMimeType(String mimeType)
+    public void setMimeType(String mimeType) throws JMSException
     {
         checkNotClosed();
         _mimeType = mimeType;
     }
 
-    public void setEncoding(String encoding) throws UnsupportedEncodingException
+    public void setEncoding(String encoding) throws JMSException, UnsupportedEncodingException
     {
         checkNotClosed();
         _encoding = encoding;

Modified: incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/Closeable.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/Closeable.java?view=diff&rev=448211&r1=448210&r2=448211
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/Closeable.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/Closeable.java Wed Sep 20 07:25:07 2006
@@ -17,6 +17,7 @@
  */
 package org.apache.qpid.client;
 
+import javax.jms.IllegalStateException;
 import javax.jms.JMSException;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -31,7 +32,7 @@
      */
     protected final AtomicBoolean _closed = new AtomicBoolean(false);
 
-    protected void checkNotClosed()
+    protected void checkNotClosed() throws JMSException
     {
         if (_closed.get())
         {

Modified: incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/Connection.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/Connection.java?view=diff&rev=448211&r1=448210&r2=448211
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/Connection.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/Connection.java Wed Sep 20 07:25:07 2006
@@ -17,15 +17,14 @@
  */
 package org.apache.qpid.jms;
 
-import javax.jms.*;
-
+import javax.jms.JMSException;
 
 public interface Connection extends javax.jms.Connection
 {
     /**
      * @return the maximum number of sessions supported by this Connection
      */
-    long getMaximumChannelCount();
+    long getMaximumChannelCount() throws JMSException;
 
     void setConnectionListener(ConnectionListener listener);
 

Modified: incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/MessageProducer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/MessageProducer.java?view=diff&rev=448211&r1=448210&r2=448211
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/MessageProducer.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/jms/MessageProducer.java Wed Sep 20 07:25:07 2006
@@ -30,14 +30,14 @@
      * Set the default MIME type for messages produced by this producer. This reduces the overhead of each message.
      * @param mimeType
      */
-    void setMimeType(String mimeType);
+    void setMimeType(String mimeType) throws JMSException;
 
     /**
      * Set the default encoding for messages produced by this producer. This reduces the overhead of each message.
      * @param encoding the encoding as understood by XXXX how do I specify this?? RG
      * @throws UnsupportedEncodingException if the encoding is not understood
      */
-    void setEncoding(String encoding) throws UnsupportedEncodingException;
+    void setEncoding(String encoding) throws UnsupportedEncodingException, JMSException;
     
     void send(Destination destination, Message message, int deliveryMode,
                      int priority, long timeToLive, boolean immediate)

Propchange: incubator/qpid/trunk/qpid/java/client/test/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Sep 20 07:25:07 2006
@@ -0,0 +1 @@
+TEST-org.apache.qpid.client.AllClientUnitTests.txt