summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/client/src/org/apache/qpid/client/AMQConnection.java5
-rw-r--r--java/client/src/org/apache/qpid/client/AMQSession.java12
-rw-r--r--java/client/src/org/apache/qpid/client/BasicMessageProducer.java4
-rw-r--r--java/client/src/org/apache/qpid/client/Closeable.java3
-rw-r--r--java/client/src/org/apache/qpid/jms/Connection.java5
-rw-r--r--java/client/src/org/apache/qpid/jms/MessageProducer.java4
6 files changed, 16 insertions, 17 deletions
diff --git a/java/client/src/org/apache/qpid/client/AMQConnection.java b/java/client/src/org/apache/qpid/client/AMQConnection.java
index f11d4d9307..3a4a6fd5d9 100644
--- a/java/client/src/org/apache/qpid/client/AMQConnection.java
+++ b/java/client/src/org/apache/qpid/client/AMQConnection.java
@@ -658,7 +658,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
return null;
}
- public long getMaximumChannelCount()
+ public long getMaximumChannelCount() throws JMSException
{
checkNotClosed();
return _maximumChannelCount;
@@ -676,7 +676,6 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
public void setMaximumChannelCount(long maximumChannelCount)
{
- checkNotClosed();
_maximumChannelCount = maximumChannelCount;
}
@@ -879,7 +878,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
* 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?
diff --git a/java/client/src/org/apache/qpid/client/AMQSession.java b/java/client/src/org/apache/qpid/client/AMQSession.java
index 6fd4e9cbef..2c59e5f809 100644
--- a/java/client/src/org/apache/qpid/client/AMQSession.java
+++ b/java/client/src/org/apache/qpid/client/AMQSession.java
@@ -381,11 +381,11 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
}
}
- public boolean getTransacted()
- {
- checkNotClosed();
- return _transacted;
- }
+ public boolean getTransacted() throws JMSException
+ {
+ checkNotClosed();
+ return _transacted;
+ }
public int getAcknowledgeMode() throws JMSException
{
@@ -680,7 +680,7 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi
{
return (org.apache.qpid.jms.MessageProducer) new FailoverSupport()
{
- public Object operation()
+ public Object operation() throws JMSException
{
checkNotClosed();
diff --git a/java/client/src/org/apache/qpid/client/BasicMessageProducer.java b/java/client/src/org/apache/qpid/client/BasicMessageProducer.java
index 9ff6d8564b..a6bc7a0781 100644
--- a/java/client/src/org/apache/qpid/client/BasicMessageProducer.java
+++ b/java/client/src/org/apache/qpid/client/BasicMessageProducer.java
@@ -466,13 +466,13 @@ public class BasicMessageProducer extends Closeable implements org.apache.qpid.j
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;
diff --git a/java/client/src/org/apache/qpid/client/Closeable.java b/java/client/src/org/apache/qpid/client/Closeable.java
index 0381823b69..b4aec84ab6 100644
--- a/java/client/src/org/apache/qpid/client/Closeable.java
+++ b/java/client/src/org/apache/qpid/client/Closeable.java
@@ -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 @@ public abstract class Closeable
*/
protected final AtomicBoolean _closed = new AtomicBoolean(false);
- protected void checkNotClosed()
+ protected void checkNotClosed() throws JMSException
{
if (_closed.get())
{
diff --git a/java/client/src/org/apache/qpid/jms/Connection.java b/java/client/src/org/apache/qpid/jms/Connection.java
index 88cfdfc65f..22e09d0f93 100644
--- a/java/client/src/org/apache/qpid/jms/Connection.java
+++ b/java/client/src/org/apache/qpid/jms/Connection.java
@@ -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);
diff --git a/java/client/src/org/apache/qpid/jms/MessageProducer.java b/java/client/src/org/apache/qpid/jms/MessageProducer.java
index e00d271cc3..12aad6a61e 100644
--- a/java/client/src/org/apache/qpid/jms/MessageProducer.java
+++ b/java/client/src/org/apache/qpid/jms/MessageProducer.java
@@ -30,14 +30,14 @@ public interface MessageProducer extends javax.jms.MessageProducer
* 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)