[
https://issues.apache.org/activemq/browse/AMQNET-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jim Gomes resolved AMQNET-143.
------------------------------
Resolution: Fixed
Added additional checks when sending a message. The .NET platform equivalent
of the Java UnsupportedOperationException is NotSupportedException. Following
are the exceptions that will be thrown:
System.NotSupportedException - if a client uses this method with a
MessageProducer that did not specify a destination at creation time.
Apache.NMS.InvalidDestinationException - if a client uses this method with a
MessageProducer with an invalid destination.
> Calling MessageProducer.Send without destination should throw more specific
> exception.
> --------------------------------------------------------------------------------------
>
> Key: AMQNET-143
> URL: https://issues.apache.org/activemq/browse/AMQNET-143
> Project: ActiveMQ .Net
> Issue Type: Bug
> Reporter: Mark Pollack
> Assignee: Jim Gomes
> Fix For: 1.1
>
>
> When sending a message on a messageproducer when the destination has not been
> set, a somewhat obscure exception is thrown. See stack trace below.
> Following the JMS spec, (see the javadocs) an exception of the type
> UnsupportedOperationException - if a client uses this method with a
> MessageProducer that did not specify a destination at creation time.
> InvalidDestinationException - if a client uses this method with a
> MessageProducer with an invalid destination.
> would be much better.
> I am using a build taken from svn on 1/14/2009.
> Apache.NMS.ActiveMQ.BrokerException: java.lang.NullPointerException :
> at Apache.NMS.ActiveMQ.Transport.ResponseCorrelator.Request(Command
> command, TimeSpan timeout) in d:\Hudson\jobs\Apache.NMS.ActiveMQ
> Trunk\workspace\src\main\csharp\Transport\ResponseCorrelator.cs:line 105
> at Apache.NMS.ActiveMQ.Connection.SyncRequest(Command command, TimeSpan
> requestTimeout) in d:\Hudson\jobs\Apache.NMS.ActiveMQ
> Trunk\workspace\src\main\csharp\Connection.cs:line 333
> at Apache.NMS.ActiveMQ.Session.DoSend(Command message, TimeSpan
> requestTimeout) in d:\Hudson\jobs\Apache.NMS.ActiveMQ
> Trunk\workspace\src\main\csharp\Session.cs:line 478
> at Apache.NMS.ActiveMQ.MessageProducer.Send(IDestination destination,
> IMessage message, Boolean persistent, Byte priority, TimeSpan timeToLive,
> Boolean specifiedTimeToLive) in d:\Hudson\jobs\Apache.NMS.ActiveMQ
> Trunk\workspace\src\main\csharp\MessageProducer.cs:line A first chance
> exception of type 'System.IO.EndOfStreamException' occurred in mscorlib.dll
> The thread 0x1e54 has exited with code 0 (0x0).
> The thread 0x5d4 has exited with code 0 (0x0).
> The thread 0x1208 has exited with code 0 (0x0).
> A first chance exception of type 'System.IO.EndOfStreamException' occurred in
> mscorlib.dll
> The thread 0x1978 has exited with code 0 (0x0).
> The thread 0x1ed4 has exited with code 0 (0x0).
> The thread 0x1ba0 has exited with code 0 (0x0).
> A first chance exception of type 'System.IO.EndOfStreamException' occurred in
> mscorlib.dll
> The thread 0x1758 has exited with code 0 (0x0).
> 172
> at Apache.NMS.ActiveMQ.MessageProducer.Send(IMessage message) in
> d:\Hudson\jobs\Apache.NMS.ActiveMQ
> Trunk\workspace\src\main\csharp\MessageProducer.cs:line 120
> at
> Spring.NmsQuickStart.Client.Gateways.RequestReplyNmsTemplate.<>c__DisplayClass2.<ConvertAndSendRequestReply>b__0(ISession
> session, IMessageProducer producer) in
> L:\projects\spring-net\trunk\examples\Spring\Spring.NmsQuickStart\src\Spring\Spring.NmsQuickStart.Client\Gateways\RequestReplyNmsTemplate.cs:line
> 17
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.