Author: rajith
Date: Tue Nov 27 09:51:09 2007
New Revision: 598717
URL: http://svn.apache.org/viewvc?rev=598717&view=rev
Log:
added a jvm switch called -DnoAck to disable the semantic ack, the current
solution used a Qpid specific NO_ACK method in the extended session. However if
people are using a pure JMS API then they have no way of taking use of this
feature, therefore I added this jvm switch
Modified:
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Modified:
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=598717&r1=598716&r2=598717&view=diff
==============================================================================
---
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
(original)
+++
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Tue Nov 27 09:51:09 2007
@@ -350,8 +350,7 @@
throw new AMQException(AMQConstant.INTERNAL_ERROR, "problem when
registering consumer", e);
}
getQpidSession().messageSubscribe(queueName.toString(), tag.toString(),
- (consumer.getAcknowledgeMode() !=
org.apache.qpid.jms.Session.NO_ACKNOWLEDGE) ?
-
Session.TRANSFER_CONFIRM_MODE_REQUIRED :
Session.TRANSFER_CONFIRM_MODE_NOT_REQUIRED,
+ (Boolean.getBoolean("noAck")
?Session.TRANSFER_CONFIRM_MODE_NOT_REQUIRED:Session.TRANSFER_CONFIRM_MODE_REQUIRED),
preAcquire ?
Session.TRANSFER_ACQUIRE_MODE_PRE_ACQUIRE :
Session.TRANSFER_ACQUIRE_MODE_NO_ACQUIRE,
new
MessagePartListenerAdapter((BasicMessageConsumer_0_10) consumer), null,
consumer.isNoLocal() ?
Option.NO_LOCAL : Option.NO_OPTION,