>"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 <[EMAIL PROTECTED]> 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.

Reply via email to