summaryrefslogtreecommitdiff
path: root/java/client
Commit message (Collapse)AuthorAgeFilesLines
* synchronized with trunk except for ruby dirRafael H. Schloming2009-12-26160-4745/+5906
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid.rnr@893970 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1245: use notifyMessage rather than onMessage in setMessageListener so ↵Rafael H. Schloming2008-08-151-1/+1
| | | | | | that messages from the synchronous queue actually get acked git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@686172 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1244: fix for NPE on broker initiated connection close, also preserve ↵Rafael H. Schloming2008-08-141-0/+1
| | | | | | the connection close text for better error reporting git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@686068 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1236: made setObjectProperty validate the passed in valueRafael H. Schloming2008-08-131-0/+22
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@685536 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1235: fixed setXXXProperty to check for empty stringsRafael H. Schloming2008-08-121-0/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@685218 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1233: made getStringProperty(nonexistent) return null instead of NPERafael H. Schloming2008-08-121-8/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@685207 13f79535-47bb-0310-9956-ffa450edef68
* QPID-615: Merge rupertlssmiths 581293Aidan Skinner2008-08-121-0/+125
| | | | | | QPID-615, Added patched version of MINAs VM Pipe cleanup thread. Will replace once bug fix is in newer version of MINA. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@685151 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1092: Merge 662770 to trunk from ritchiem:Aidan Skinner2008-08-121-23/+1
| | | | | | | Changed toString to be String.valueOf(getObject()) Added MessageToStringTest, tests performing toString on Message before calling getObject(). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@685115 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1218: cleaned up the interface to IoTransport a bit; added IoAcceptor; ↵Rafael H. Schloming2008-08-092-5/+5
| | | | | | fixed Session tracking of sync point; default JAVA inside qpid-run git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@684182 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1213: simplified unprocessed message and moved version specific code ↵Rafael H. Schloming2008-08-0828-842/+546
| | | | | | into the _0_8 and _0_10 variants git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@684036 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1218 Optionally use IoTransport, it's hot, but doesn't pass all the ↵Aidan Skinner2008-08-084-5/+171
| | | | | | tests yet. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@684016 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1213: fixed a performance regressing from converting uuid -> string and ↵Rafael H. Schloming2008-08-081-4/+1
| | | | | | back again git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683941 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1213: removed empty .java files leftover from applying a patchRafael H. Schloming2008-08-071-0/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683744 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1213: Patch from rgodfrey to refactor AbstractJMSMessage and ↵Rafael H. Schloming2008-08-0739-913/+2346
| | | | | | descendants to move AMQP version specific code into delegates and remove unnecessary conversion between 0-8 and 0-10 objects git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683683 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1182 : Some of the NullPointerExceptions from the SimpleACLTest are due ↵Martin Ritchie2008-08-071-7/+14
| | | | | | to the close and the notification overlapping due to the lack of locking. The problem is that the AtomicBoolean _closed is used for control but the AMQSession.checkNotClosed needs to check _closed and then throw any exception in the StateManager. However, in a loop of the SimpleACLTest, I would see _closed == false but then it is set right afterwards but the option to check AMQStateManager and throw the exception is past and the super.Closeable.checkNotClosed is called and throws the JMSException with no linked exception hence the test throws NullPointerException git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683635 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1221: added customizable UUID generation and switched the default ↵Rafael H. Schloming2008-08-061-1/+5
| | | | | | strategy to use nameUUIDFromBytes rather than randomUUID git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683337 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1219: cleanup of prior commit (r682887)Rafael H. Schloming2008-08-051-15/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@682915 13f79535-47bb-0310-9956-ffa450edef68
* Profiling driven changes:Rafael H. Schloming2008-08-0510-302/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - made AMQShortString cache the toString() value - added static initializer to IoTransport to disable use of pooled byte buffers - modified IoSender to permit buffering - removed OutputHandler and eliminated intermediate Frame generation between Disassembler and Sender<ByteBuffer> (IoSender) - made Disassembler take advantage of IoSender's buffering - removed Header and Data as distinct protocol events, added Header and Body members to MessageTransfer - modified Assembler and Disassembler to decode/encode Header and Data directly to/from MessageTransfer - modified Disassembler to only write data if encoding of headers is successful - added Strings.toUTF8(String) -> byte[] to do proper UTF-8 encoding that is also fast for 7-bit ascii - modified JMSTextMessage to use the Strings.toUTF8 - modified QpidBench to only generate 7-bit ascii when using TextMessage git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@682887 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1206: Fix failover and failover testsAidan Skinner2008-08-053-36/+13
| | | | | | | | | | | | | | | AMQConnection: remove dead and confusingly misnamed method AMQSession: rename failedOver to failedOverDirty to convey actual usage, only set it if we failed over while dirty. Ewww! BasicMessageConsumer: if we're in client ack mode, mark as dirty when we receive a message PingPongProducer: calculate expected replies properly if we fail after a send or before a commit FailoverTest: test transacted case git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@682672 13f79535-47bb-0310-9956-ffa450edef68
* This is related to QPID-1208 .Rajith Muditha Attapattu2008-07-311-4/+3
| | | | | | | | I have enabled the code which will print xxxx when the log level != debug. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@681408 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1192: Make consumer send Selector as part of binding.Aidan Skinner2008-07-305-16/+38
| | | | | | | | | QPID-1191: Add test to exhibit leak Change DurableSubscriptionTest to validate exception type recieved Make BasicMessageConsumer validate the Selector before attempting creation git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@681117 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1072: renamed org.apache.qpidity -> org.apache.qpidRafael H. Schloming2008-07-2957-300/+295
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@680803 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1203: Add 08ExcludeList for external Java broker and make the profile ↵Aidan Skinner2008-07-291-3/+12
| | | | | | | | use that. Make AMQConnectionFactory take an optional clientid and use that if specified. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@680752 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1203 Don't treat protocol negotiation failure as failover reducing error.Aidan Skinner2008-07-291-4/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@680750 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1201: fixed up version of aidan's patch, there are still failures when ↵Rafael H. Schloming2008-07-296-72/+67
| | | | | | running against an external java broker, however we seem to get past basic connection negotiation now git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@680602 13f79535-47bb-0310-9956-ffa450edef68
* Updated the io transport to use a separate write thread with a circular ↵Rafael H. Schloming2008-07-222-26/+16
| | | | | | buffer that does opportunistic write batching. Fixed error handling and shutdown for the io transport. Switched default from mina to the io transport for the 0-10 client. Modified InputHandler to accumulate bytes in the outer loop and simplified the state machine accordingly. These changes should address QPID-1188, prevent the Java client from running out of memory when writing messages faster than the network and/or broker can keep up, and in general improve performance. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@678848 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1177 : Fixed the format of the messages, realised that the ↵Martin Ritchie2008-07-171-6/+2
| | | | | | transport.Connection uses a logging wrapper but in my haste to make the format the same in AMQProtocolHandler hadn't checked the output was as expected. Was missing the String.format. Also there was an extra debug level output of the sent frame. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@677525 13f79535-47bb-0310-9956-ffa450edef68
* Update to the logging to ensure QpidTestCase is always logged and ↵Martin Ritchie2008-07-161-2/+2
| | | | | | standardized the protocol output format between 0-8/0-9 and 0-10 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@677319 13f79535-47bb-0310-9956-ffa450edef68
* Added a warning log statement if the TransportConnection autocreates an InVM ↵Martin Ritchie2008-07-161-0/+1
| | | | | | Broker git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@677258 13f79535-47bb-0310-9956-ffa450edef68
* Changed erroneous error level logging to info levelMartin Ritchie2008-07-162-6/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@677257 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1178 : Prevent Rejecting messages destined for known QueueBrowsersMartin Ritchie2008-07-161-3/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@677256 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1177 : Added Protocol Level Debug logging. Uses a final static so ↵Martin Ritchie2008-07-151-1/+13
| | | | | | should JIT out if disabled. To enable set -Damqj.protocol.logging.level=info git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676982 13f79535-47bb-0310-9956-ffa450edef68
* QPID-940,QPID-594,QPID-805,QPID-826 : Updated the client exception handling ↵Martin Ritchie2008-07-1535-812/+927
| | | | | | | | | | | | | | | | | | | | | | so that exceptions are not lost. In performing the changes I noted that the AMQStateManager is only used for connection creation in the 08/09 codepath. Now this may be due to the fact that we don't currently need to wait on any other states. We need to improve our testing of error conditions for all protcol versions. Changes Summary: The MethodHandlers had their AMQStateManager parameters swapped for AMQSession as that is what they all cared about. The BlockingMethodFrameListener was used as a basis to create a generic BlockingWaiter which is now used by StateWaiter, There is probably scope to refactor the AMQStateManager and the parts of the AMQProtocolHandler that deal with the _frameListeners into a generic class but that can be looked at as part of a wider client refactor. Additionally tests were updated such as SimpleACLTest and ConnectionTest as they were expecting JMSExceptions from the constructor but the JMS API does not demand that and AMQExceptions are now correctly being thrown. The SimpleACLTest also required a change to AMQSession. The test calls send which will cause the connection to be closed asynchrously due to a permission violation. As this exception is not expected and is asynchorous to the client code it cannot be directly thrown. The solution is to record this exception in the AMQStateManager, it can tell that there are no waiters for the exception so it can record the value.(Potential exists to alert if the exception is overwritten but I don't think this is required right now) When the AMQSession checks that the connection is closed it is then possible to check if the current State is CLOSED and if we have an exception sitting in the AMQStateManager. If all these are true we can attach the AMQStateManager exception to the IllegalState Exception that is normally thrown when the Session is closed. This maintains JMS Compliance and allows us to discover the cause of the failure, SimpleACLTest was updated by removing the IllegalState catch section that was causing the test to silently fail. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676978 13f79535-47bb-0310-9956-ffa450edef68
* QPID-984 : Applied fix from M2.1.x that adds requried synchronization around ↵Martin Ritchie2008-07-151-98/+81
| | | | | | setup and tear down of Connections. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676973 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1079 : Based on Code Review : Remvoed AutoCreateVMBroker code from ↵Martin Ritchie2008-07-1560-14475/+0
| | | | | | QpidTestCase. Removed VMTestCase and all references to it, it was only used in JUnit4 testSuite wrappers. Rather than move QpidTestCase to a new module all client tests have that require this class have been moved to systests. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676971 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1079 : Based on Code Review : Remvoed AutoCreateVMBroker code from ↵Martin Ritchie2008-07-1549-835/+51
| | | | | | QpidTestCase. Removed VMTestCase and all references to it, it was only used in JUnit4 testSuite wrappers. Rather than move QpidTestCase to a new module all client tests have that require this class have been moved to systests. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676969 13f79535-47bb-0310-9956-ffa450edef68
* Removed the non ASCII characters that are causing the build to minorly complain.Martin Ritchie2008-07-152-8/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676886 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1171: batch acks when prefetch is usedRafael H. Schloming2008-07-102-4/+37
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@675433 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1062: moved channel id into the ProtocolEvent interface and removed ↵Rafael H. Schloming2008-07-101-3/+2
| | | | | | ConnectionEvent, this removes the overhead of creating ConnectionEvents git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@675397 13f79535-47bb-0310-9956-ffa450edef68
* Primarily profiling driven changes:Rafael H. Schloming2008-07-0911-76/+81
| | | | | | | | | | | | | | | | | | | | | | | - added batched writes of commands/controls issued on a session - copy fragmented frames and segments rather than trying to decode them piecemeal, removed FragmentDecoder - added caching for str8 encode/decode - compute sizes as we encode by going back and filling in the amount of bytes written rather than computing it up front - added SYNC option to commands - renamed NO_OPTION argument to NONE - added a timeout to Client.java - removed use of UUID.fromString in BasicMessageProducer_0_10.java git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@675165 13f79535-47bb-0310-9956-ffa450edef68
* QPID-293 allow messages which have been received by the consumer before a ↵Aidan Skinner2008-07-082-4/+12
| | | | | | | | | | message listener has been set to be delivered. BasicMessageConsumer.java: If there are messages on the synchronous queue when a message listener is set, deliver them to it since they can no longer be consumed(). MessageListenerTest.java: Uncomment code that will make the test fail and demonstrate the bug git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674747 13f79535-47bb-0310-9956-ffa450edef68
* The last checkin for this class was using a Java 1.6 specific method called ↵Rajith Muditha Attapattu2008-07-071-1/+1
| | | | | | | | | | isEmpty in the String class. This fails the build in Java 1.5. I modified it to use str.length == 0 which has the same effect. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674389 13f79535-47bb-0310-9956-ffa450edef68
* Qpid-940 - ConnectionTest#testPasswordFailureConnection fails occasionally ↵Martin Ritchie2008-07-042-49/+73
| | | | | | | | | | so while these race conditions are addressed I've converted the ConnectionTest to QpidTestCase and use it to skip the PasswordFailureConnection. junit.framework.AssertionFailedError: No cause set at org.apache.qpid.test.unit.client.connection.ConnectionTest.testPasswordFailureConnection(ConnectionTest.java:145) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674058 13f79535-47bb-0310-9956-ffa450edef68
* QPID-962 Exception handling was... unpleasing... Fix up of patch from rhsAidan Skinner2008-07-036-57/+67
| | | | | | | | | | | | | | | | AMQConnection.java: Refactor listener and stack exceptions in a list. Add get lastException, which can now be any Exception. Don't set connected, let the delegate decide. AMQConnectionDelegate_8_0.java, AMQConnectionDelete_0_10.java: set _connected to true if we suceed AMQProtocolHandler.java: attainState can now throw any sort of Exception AMQStateManager.java: attainState can now throw any Exception ConnectionTest.java: check that exception cause is not null AMQConnectionFailureException.java: Add ability to store a Collection of Exceptions in case there are multiple possible causes of the failure. Which there shouldn't be, but it can happen. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@673688 13f79535-47bb-0310-9956-ffa450edef68
* Revert "QPID-962 Exception handling was... unpleasing... Fix up of patch ↵Aidan Skinner2008-07-025-62/+55
| | | | | | | | from rhs" This reverts commit 673343. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@673401 13f79535-47bb-0310-9956-ffa450edef68
* QPID-960 remember to rename classAidan Skinner2008-07-021-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@673351 13f79535-47bb-0310-9956-ffa450edef68
* QPID-960 copy delegate properlyAidan Skinner2008-07-021-0/+234
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@673350 13f79535-47bb-0310-9956-ffa450edef68
* QPID-960 make protocol negotiation work from 0-10 down to 0-9 and then 8-0Aidan Skinner2008-07-023-235/+33
| | | | | | | | | | still needs love to do with railover, see QPID-959 AMQConnection.java: use 8_0 delegate for in-vm tests AMQConnectionDelegate_0_9.java: add subclass for class.forname'ing rename AMQConnectionDelegate_0_8.java to AMQConnectionDelegate_8_0.java to match protocol version properly git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@673347 13f79535-47bb-0310-9956-ffa450edef68
* QPID-962 Exception handling was... unpleasing... Fix up of patch from rhsAidan Skinner2008-07-025-55/+62
| | | | | | | | | | | | | | AMQConnection: Refactor listener and remove list, we're only interested in the most recent one anyway. Add get/set for lastException, which can now be any Exception AMQConnectionDelegate_0_8.java: Stop masking/stackign exceptions, just throw them. AMQProtocolHandler.java: attainState can now throw any sort of Exception AMQStateManager.java: attainState can now throw any Exception ConnectionTest.java: check that exception cause is not null git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@673343 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1163: Moved message ack in pre-deliver methodArnaud Simon2008-07-012-14/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@673074 13f79535-47bb-0310-9956-ffa450edef68