summaryrefslogtreecommitdiff
path: root/java/client/src/main/java/org/apache/qpid/client/QueueSenderAdapter.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/client/src/main/java/org/apache/qpid/client/QueueSenderAdapter.java')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/QueueSenderAdapter.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/QueueSenderAdapter.java b/java/client/src/main/java/org/apache/qpid/client/QueueSenderAdapter.java
index 15bf4a125f..f90cc97a80 100644
--- a/java/client/src/main/java/org/apache/qpid/client/QueueSenderAdapter.java
+++ b/java/client/src/main/java/org/apache/qpid/client/QueueSenderAdapter.java
@@ -52,26 +52,32 @@ public class QueueSenderAdapter implements QueueSender {
}
public int getDeliveryMode() throws JMSException {
+ checkPreConditions();
return delegate.getDeliveryMode();
}
public Destination getDestination() throws JMSException {
+ checkPreConditions();
return delegate.getDestination();
}
public boolean getDisableMessageID() throws JMSException {
+ checkPreConditions();
return delegate.getDisableMessageID();
}
public boolean getDisableMessageTimestamp() throws JMSException {
+ checkPreConditions();
return delegate.getDisableMessageTimestamp();
}
public int getPriority() throws JMSException {
+ checkPreConditions();
return delegate.getPriority();
}
public long getTimeToLive() throws JMSException {
+ checkPreConditions();
return delegate.getTimeToLive();
}
@@ -128,7 +134,7 @@ public class QueueSenderAdapter implements QueueSender {
AMQSession session = ((BasicMessageProducer)delegate).getSession();
if(session == null || session.isClosed()){
- throw new UnsupportedOperationException("Invalid Session");
+ throw new javax.jms.IllegalStateException("Invalid Session");
}
}
}