Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 79083 invoked from network); 12 Nov 2007 15:53:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2007 15:53:53 -0000 Received: (qmail 56306 invoked by uid 500); 12 Nov 2007 15:53:39 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 56284 invoked by uid 500); 12 Nov 2007 15:53:39 -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 56275 invoked by uid 99); 12 Nov 2007 15:53:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 07:53:39 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG 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; Mon, 12 Nov 2007 15:53:40 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IrbbE-00069a-3G for users@activemq.apache.org; Mon, 12 Nov 2007 07:53:20 -0800 Message-ID: <13708104.post@talk.nabble.com> Date: Mon, 12 Nov 2007 07:53:20 -0800 (PST) From: TOPPER_HARLEY To: users@activemq.apache.org Subject: Re: Unable to create MessageProducer In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: TREVOR.HIGGINS@ERICSSON.COM References: <13682284.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org >"It could just be the socket has been dropped.": Is socket dropping a common occurence or simply related to the quality of the network one is running on (my TCP level knowledge isn't great). Would vm: style for the brokerURL prevent this since it would be insice JVM? This is our setup: We have a number of predefined topics which we use when broadcasting updates and number temp queues for direct request/responses communication (one for each of our clients). We maintain one connection on the server side and as we send data from different threads, we cache a threadlocal session object (since ActiveMQSession is for single thread use). For each individual message send, we create and destroy a MessageProducer based on the destination as follows: try { // Thread local retrieval final Session session = this.getSession(); producer = session.createProducer(destination); producer.send(message); } finally { if (producer != null) { try { producer.close(); } catch (final JMSException e) { e.printStackTrace(); } } } >"You night wanna enable failover...": We have only been assigned one port for the broker (specified obviously as part of the brokerURL property) so I dont know if failover can assist us: my understanding of failover is that you need more than one URI and AMQ switches to another one if one broker goes down: e.g. failover:(tcp://localhost:61616,tcp://remotehost:61616)?initialReconnectDelay=100 or can you just use one URI and try to autoreconnect to that one? >"Without more information on how you are using the JMS client its hard to know really." Thanks for any input...BTW if i'm still not giving the right info to enable you to help please let me know.... /Tom James.Strachan wrote: > > Without more information on how you are using the JMS client its hard > to know really. It could just be the socket has been dropped. > > You night wanna enable failover... > http://activemq.apache.org/how-can-i-support-auto-reconnection.html > > On 10/11/2007, TOPPER_HARLEY wrote: >> >> Hi, >> Using AMQ4.1, non persistent, non transactional, I am running an embedded >> broker with Spring and am often getting an exception when trying to send >> a >> message: >> >> java.io.IOException: The transport is not running. >> at >> >> org.apache.activemq.transport.TransportSupport.checkStarted(TransportSupport.java:103) >> at >> >> org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:117) >> at >> >> org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141) >> at >> >> org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:80) >> at >> >> org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:93) >> at >> >> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:43) >> at >> >> org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60) >> at >> >> org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1151) >> >> I create one connection on startup and reuse that to create a session and >> message produer when trying to send a message. Is usually happens when I >> try >> to create a session or message producer. Sometimes even restarting the >> entire JVM does not fix the issue! Why would the transport be >> stopped....is >> there some background thread keeping it alive that maybe cannot get >> processor time to ping it if there is load? >> >> My XML defines one transport connector of the form >> tcp://localhost:61616?wireFormat.maxInactivityDuration=0 >> >> What can I do to workaround this issue? Can I catch the exception and try >> to >> restart the tranport somehow, although that feels like a bad solution? If >> I >> switched to a "vm:" style URI would it make it easier to keep transport >> alive? >> >> Any help is much appreciated as this has us stumped... >> >> /Tom >> >> -- >> View this message in context: >> http://www.nabble.com/Unable-to-create-MessageProducer-tf4782623s2354.html#a13682284 >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source SOA > http://open.iona.com > > -- View this message in context: http://www.nabble.com/Unable-to-create-MessageProducer-tf4782623s2354.html#a13708104 Sent from the ActiveMQ - User mailing list archive at Nabble.com.