You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2007/01/17 22:55:12 UTC
svn commit: r497195 - in
/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client:
AMQSession.java BasicMessageConsumer.java message/UnprocessedMessage.java
Author: kpvdr
Date: Wed Jan 17 13:55:11 2007
New Revision: 497195
URL: http://svn.apache.org/viewvc?view=rev&rev=497195
Log:
Last of client compile errors and exceptions
Modified:
incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage.java
Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSession.java?view=diff&rev=497195&r1=497194&r2=497195
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSession.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSession.java Wed Jan 17 13:55:11 2007
@@ -797,7 +797,7 @@
_inRecovery = inRecovery;
}
- public void acknowledge() throws JMSException, AMQException
+ public void acknowledge() throws JMSException
{
if (isClosed())
{
@@ -868,13 +868,17 @@
{
public Object operation() throws JMSException
{
- checkNotClosed();
- long producerId = getNextProducerId();
- BasicMessageProducer producer = new BasicMessageProducer(_connection, (AMQDestination) destination, _transacted, _channelId,
- AMQSession.this, _connection.getProtocolHandler(),
- producerId, immediate, mandatory, waitUntilSent);
- registerProducer(producerId, producer);
- return producer;
+ try
+ {
+ checkNotClosed();
+ long producerId = getNextProducerId();
+ BasicMessageProducer producer = new BasicMessageProducer(_connection, (AMQDestination) destination, _transacted, _channelId,
+ AMQSession.this, _connection.getProtocolHandler(),
+ producerId, immediate, mandatory, waitUntilSent);
+ registerProducer(producerId, producer);
+ return producer;
+ }
+ catch (AMQException e) { throw new JMSException(e.toString()); }
}
}.execute(_connection);
}
Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java?view=diff&rev=497195&r1=497194&r2=497195
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java Wed Jan 17 13:55:11 2007
@@ -681,16 +681,22 @@
}
}
- public void acknowledge() throws JMSException, AMQException
+ public void acknowledge() throws JMSException
{
if(!isClosed())
{
-
- Iterator<Long> tags = _unacknowledgedDeliveryTags.iterator();
- while(tags.hasNext())
+ try
{
- _session.acknowledgeMessage(tags.next(), false);
- tags.remove();
+ Iterator<Long> tags = _unacknowledgedDeliveryTags.iterator();
+ while(tags.hasNext())
+ {
+ _session.acknowledgeMessage(tags.next(), false);
+ tags.remove();
+ }
+ }
+ catch (AMQException e)
+ {
+ throw new JMSException(e.toString());
}
}
else
Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage.java?view=diff&rev=497195&r1=497194&r2=497195
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage.java Wed Jan 17 13:55:11 2007
@@ -40,6 +40,7 @@
public Content content;
public int channelId;
+ public long deliveryTag;
public MessageHeaders contentHeader;
}