keenan
09-04-2008, 03:09 PM
If I attempt to start our command line service without first having started AMQ, the process aborts with a stack trace on the console:
Unhandled Exception: System.Configuration.ConfigurationErrorsException: Error creating context 'spring.root':
No connection could be made because the target machine actively refused it 127.0.0.1:61616
---> Spring.Util.FatalReflectionException: Cannot instantiate Type [Spring.Context.Support.XmlApplicationContext] using ctor [Void .ctor(System.String, Boolean, System.String[])] : 'Exception has been thrown by the target of an invocation.'
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> Spring.Objects.Factory.ObjectCreationException: Error thrown by a dependency of object 'XXX' defined in 'file [XXX.xml]' : Initialization of object failed : No connection could be made because the target machine actively refused it 127.0.0.1:61616 while resolving 'StartObjects[0]' to 'XXX' defined in 'file [XXX.xml]'
---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:61616
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFact ory.Connect(String host, Int32 port) in TcpTransportFactory.cs:line 114
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFact ory.CreateTransport(Urilocation) in TcpTransportFactory.cs:line 72
at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnec tion(String userName, String password) in ConnectionFactory.cs:line 94
at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnec tion() in ConnectionFactory.cs:line 80
at Spring.Messaging.Nms.Connections.SingleConnectionF actory.DoCreateConnection() in SingleConnectionFactory.cs:line 349
at Spring.Messaging.Nms.Connections.SingleConnectionF actory.InitConnection() in SingleConnectionFactory.cs:line 273
at Spring.Messaging.Nms.Connections.SingleConnectionF actory.CreateConnection() in SingleConnectionFactory.cs:line 237
at Spring.Messaging.Nms.Support.NmsAccessor.CreateCon nection() in NmsAccessor.cs:line 145
at Spring.Messaging.Nms.Listener.AbstractListenerCont ainer.CreateSharedConnection() in AbstractListenerContainer.cs:line 451
at Spring.Messaging.Nms.Listener.AbstractListenerCont ainer.EstablishSharedConnection() in AbstractListenerContainer.cs:line 413
at Spring.Messaging.Nms.Listener.SimpleMessageListene rContainer.DoInitialize() in SimpleMessageListenerContainer.cs:line 161
at Spring.Messaging.Nms.Listener.AbstractListenerCont ainer.Initialize() in AbstractListenerContainer.cs:line 273
at Spring.Messaging.Nms.Listener.AbstractListenerCont ainer.AfterPropertiesSet() in AbstractListenerContainer.cs:line 222
at Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.InvokeInitMethods(Object target, String name, IConfigurableObjectDefinition definition) in AbstractAutowireCapableObjectFactory.cs:line 1257
My question: Is this the desired/expected behavior for a SimpleMessageListenerContainer when the AutoStartup property is set to false?
Here is the use case: We have multiple instances of this service and in cases where queueing features are not needed, I was hoping to be able to deploy the same Config.xml in all locations and use the AutoStartup property (set from a placeholder) to enable/disable queueing.
Does that make sense?
Unhandled Exception: System.Configuration.ConfigurationErrorsException: Error creating context 'spring.root':
No connection could be made because the target machine actively refused it 127.0.0.1:61616
---> Spring.Util.FatalReflectionException: Cannot instantiate Type [Spring.Context.Support.XmlApplicationContext] using ctor [Void .ctor(System.String, Boolean, System.String[])] : 'Exception has been thrown by the target of an invocation.'
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> Spring.Objects.Factory.ObjectCreationException: Error thrown by a dependency of object 'XXX' defined in 'file [XXX.xml]' : Initialization of object failed : No connection could be made because the target machine actively refused it 127.0.0.1:61616 while resolving 'StartObjects[0]' to 'XXX' defined in 'file [XXX.xml]'
---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:61616
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFact ory.Connect(String host, Int32 port) in TcpTransportFactory.cs:line 114
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFact ory.CreateTransport(Urilocation) in TcpTransportFactory.cs:line 72
at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnec tion(String userName, String password) in ConnectionFactory.cs:line 94
at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnec tion() in ConnectionFactory.cs:line 80
at Spring.Messaging.Nms.Connections.SingleConnectionF actory.DoCreateConnection() in SingleConnectionFactory.cs:line 349
at Spring.Messaging.Nms.Connections.SingleConnectionF actory.InitConnection() in SingleConnectionFactory.cs:line 273
at Spring.Messaging.Nms.Connections.SingleConnectionF actory.CreateConnection() in SingleConnectionFactory.cs:line 237
at Spring.Messaging.Nms.Support.NmsAccessor.CreateCon nection() in NmsAccessor.cs:line 145
at Spring.Messaging.Nms.Listener.AbstractListenerCont ainer.CreateSharedConnection() in AbstractListenerContainer.cs:line 451
at Spring.Messaging.Nms.Listener.AbstractListenerCont ainer.EstablishSharedConnection() in AbstractListenerContainer.cs:line 413
at Spring.Messaging.Nms.Listener.SimpleMessageListene rContainer.DoInitialize() in SimpleMessageListenerContainer.cs:line 161
at Spring.Messaging.Nms.Listener.AbstractListenerCont ainer.Initialize() in AbstractListenerContainer.cs:line 273
at Spring.Messaging.Nms.Listener.AbstractListenerCont ainer.AfterPropertiesSet() in AbstractListenerContainer.cs:line 222
at Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.InvokeInitMethods(Object target, String name, IConfigurableObjectDefinition definition) in AbstractAutowireCapableObjectFactory.cs:line 1257
My question: Is this the desired/expected behavior for a SimpleMessageListenerContainer when the AutoStartup property is set to false?
Here is the use case: We have multiple instances of this service and in cases where queueing features are not needed, I was hoping to be able to deploy the same Config.xml in all locations and use the AutoStartup property (set from a placeholder) to enable/disable queueing.
Does that make sense?