Re: Camel JMS Component (ActiveMQ) Repeatedly Reconnects

2009-03-27 Thread greenbean

Hmmm I still get the same error.  I test by sending a text message to a
queue using JConsole to invoke the sendMessage operation on the queue. 
Errors start showing up in the log as soon as the message is sent.  It shows
up in the queue.  It is not processed.  I instead keep seeing the message
shown below.


2009-03-27 19:24:14,419 INFO 
[com.ngc.ident1.activemq.transport.orderedfailover.OrderedFailoverTransport]
(ActiveMQ Transport: tcp://localhost/127.0.0.1:61616) Transport failed,
attempting to automatically reconnect due to: java.net.SocketException:
Socket closed
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
at java.io.DataInputStream.readInt(DataInputStream.java:370)
at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)
at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:210)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:202)
at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
at java.lang.Thread.run(Thread.java:619)



James.Strachan wrote:
 
 2009/3/19 Claus Ibsen claus.ib...@gmail.com:
 On Wed, Mar 18, 2009 at 8:07 PM, greenbean kevin.urci...@ngc.com wrote:

 I made the change you suggested.  However, I am getting the same error.
 :-(

 Do you have any other suggestions?
 Isnt it because you have CACHE_NONE?
  property name=cacheLevelName value=CACHE_NONE /

 I would assume all resources is cleared after use and thus the it
 needs to reconnect on every new message.
 
 Agreed - CACHE_NONE basically means to create a new connection,
 session, consumer/producer for each message you send/receive then
 close them all down again. The way to avoid that is to reuse the
 ActiveMQComponent (as it uses a pooling ConnectionFactory under the
 hood) or use an explicit pooling connection factory.
 
 More details here...
 http://activemq.apache.org/jmstemplate-gotchas.html
 
 -- 
 James
 ---
 http://macstrac.blogspot.com/
 
 Open Source Integration
 http://fusesource.com/
 
 

-- 
View this message in context: 
http://www.nabble.com/Camel-JMS-Component-%28ActiveMQ%29-Repeatedly-Reconnects-tp22546705p22746194.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.



Re: Camel JMS Component (ActiveMQ) Repeatedly Reconnects

2009-03-18 Thread greenbean

I made the change you suggested.  However, I am getting the same error. :-(

Do you have any other suggestions?


Claus Ibsen-2 wrote:
 
 Hi
 
 You should use the ActiveMQ component instead of the generic
 JmsComponent. Its optimized for AMQ.
 http://camel.apache.org/activemq.html
 
 
 
 On Mon, Mar 16, 2009 at 9:37 PM, greenbean kevin.urci...@ngc.com wrote:

 Apache Camel 2.0 Snapshot
 Apache ActiveMQ 5.2

 When I started Apache Camel I see repeated connect/disconnect events in
 activemq.  Is there something I have done incorrectly to have activemq do
 this?  I use ActiveMQ other places (outside of camel) and everything
 works
 fine.

 Below is the XML configuration and the DEBUG log information from
 ActiveMQ.
 -
 camel:camelContext id=camel
                camel:route
                        camel:from uri=activemq:queue:testa /
                        camel:policy ref=PROPAGATION_REQUIRED /
                        camel:process ref=myProcessor /
                        camel:to uri=activemq:queue:testb /
                /camel:route
        /camel:camelContext
        bean id=myProcessor
 class=com.ngc.ident1.example.camel.CamelProcessor
        /bean
        bean id=activemq
 class=org.apache.camel.component.jms.JmsComponent
                property name=connectionFactory
                        bean
 class=org.apache.activemq.ActiveMQXAConnectionFactory
                                property name=brokerURL
                                        value${local.broker.url}/value
                                /property
                        /bean
                /property
                property name=cacheLevelName value=CACHE_NONE /
                property name=transacted value=true /
                property name=transactionManager
 ref=transactionManager
 /
        /bean
        bean id=PROPAGATION_REQUIRED
 class=org.apache.camel.spring.spi.SpringTransactionPolicy
                constructor-arg
                        bean
 class=org.springframework.transaction.support.TransactionTemplate
                                property name=transactionManager
 ref=transactionManager /
                        /bean
                /constructor-arg
        /bean
 -

 2009-03-16 20:34:08,482 DEBUG
 [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Task)
 Sending: WireFormatInfo { version=3, properties={CacheSize=1024,
 CacheEnabled=true, SizePrefixDisabled=false,
 MaxInactivityDurationInitalDelay=1, TcpNoDelayEnabled=true,
 MaxInactivityDuration=3, TightEncodingEnabled=true,
 StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
 2009-03-16 20:34:08,485 DEBUG
 [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport
 Initiator: /127.0.0.1:59998) Sending: WireFormatInfo { version=3,
 properties={CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false,
 MaxInactivityDurationInitalDelay=1, TcpNoDelayEnabled=true,
 MaxInactivityDuration=3, TightEncodingEnabled=true,
 StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
 2009-03-16 20:34:08,485 DEBUG
 [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
 tcp:///127.0.0.1:59998) Received WireFormat: WireFormatInfo { version=3,
 properties={CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false,
 MaxInactivityDurationInitalDelay=1, TcpNoDelayEnabled=true,
 MaxInactivityDuration=3, TightEncodingEnabled=true,
 StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
 2009-03-16 20:34:08,485 DEBUG
 [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
 tcp:///127.0.0.1:59998) tcp:///127.0.0.1:59998 before negotiation:
 OpenWireFormat{version=3, cacheEnabled=false, stackTraceEnabled=false,
 tightEncodingEnabled=false, sizePrefixDisabled=false}
 2009-03-16 20:34:08,485 DEBUG
 [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
 tcp:///127.0.0.1:59998) tcp:///127.0.0.1:59998 after negotiation:
 OpenWireFormat{version=3, cacheEnabled=true, stackTraceEnabled=true,
 tightEncodingEnabled=true, sizePrefixDisabled=false}
 2009-03-16 20:34:08,486 DEBUG
 [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
 tcp://localhost/127.0.0.1:61616) Received WireFormat: WireFormatInfo {
 version=3, properties={CacheSize=1024, CacheEnabled=true,
 SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=1,
 TcpNoDelayEnabled=true, MaxInactivityDuration=3,
 TightEncodingEnabled=true, StackTraceEnabled=true},
 magic=[A,c,t,i,v,e,M,Q]}
 2009-03-16 20:34:08,486 DEBUG
 [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
 tcp://localhost/127.0.0.1:61616) tcp://localhost/127.0.0.1:61616 before
 negotiation: OpenWireFormat{version=3, cacheEnabled=false,
 stackTraceEnabled=false, tightEncodingEnabled=false,
 sizePrefixDisabled=false}
 2009-03-16 20:34:08,486 DEBUG