Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 25987 invoked from network); 27 Jan 2010 04:05:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Jan 2010 04:05:09 -0000 Received: (qmail 28953 invoked by uid 500); 27 Jan 2010 04:05:09 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 28777 invoked by uid 500); 27 Jan 2010 04:05:09 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 28767 invoked by uid 99); 27 Jan 2010 04:05:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2010 04:05:08 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2010 04:05:00 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NZz8y-0007MW-3T for users@activemq.apache.org; Tue, 26 Jan 2010 20:04:40 -0800 Message-ID: <27333888.post@talk.nabble.com> Date: Tue, 26 Jan 2010 20:04:40 -0800 (PST) From: johncarl81 To: users@activemq.apache.org Subject: Testing around BlobMessage MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jericksen@kcp.com Hello, I am trying to write some unit tests around an embedded ActiveMQ configured using the suggested testing configuration: ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); When I try to use the producer to send a message from a session.createBlobMessage(...) the unit test responds with the following exception: javax.jms.JMSException: Connection refused: connect at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62) at org.apache.activemq.command.ActiveMQBlobMessage.onSend(ActiveMQBlobMessage.java:176) at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1674) at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231) at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241) ... Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:323) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:837) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:778) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:703) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:881) at org.apache.activemq.blob.DefaultBlobUploadStrategy.uploadStream(DefaultBlobUploadStrategy.java:59) at org.apache.activemq.blob.BlobUploader.upload(BlobUploader.java:53) at org.apache.activemq.command.ActiveMQBlobMessage.onSend(ActiveMQBlobMessage.java:173) ... 32 more It looks like the client is trying to upload the 'blob' and failing to do so because of a connection problem (refused). Is there a better way to test around the blob message functionality? Maybe mocking the functionality further than simply embedding activemq? Thanks for your reply. John -- View this message in context: http://old.nabble.com/Testing-around-BlobMessage-tp27333888p27333888.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.