You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Krzysztof Porębski (Jira)" <ji...@apache.org> on 2020/03/14 16:55:00 UTC
[jira] [Resolved] (AMQNET-633) Cannot create Session when
Connection not started
[ https://issues.apache.org/jira/browse/AMQNET-633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krzysztof Porębski resolved AMQNET-633.
---------------------------------------
Resolution: Fixed
> Cannot create Session when Connection not started
> -------------------------------------------------
>
> Key: AMQNET-633
> URL: https://issues.apache.org/jira/browse/AMQNET-633
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: AMQP
> Affects Versions: 1.8.0
> Reporter: Krzysztof Porębski
> Assignee: Krzysztof Porębski
> Priority: Major
> Fix For: AMQP-1.8.1
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> There is a problem with creating of nms sessions when connection is not started upfront. The issue reveals itself only in multi-threaded environment. The following integration test can be used to recreate the issue.
> {code:java}
> public class NmsSessionTest : AmqpTestSupport
> {
> [Test, Timeout(10_000)]
> public void TestCreateMultipleSessionsFromDifferentThreadsWhenConnectionNotStarted()
> {
> Connection = CreateAmqpConnection();
> Assert.NotNull(Connection);
> Parallel.For(0, 10, i =>
> {
> ISession session = Connection.CreateSession();
> Assert.NotNull(session);
> });
> }
> }
> {code}
>
> As a result following exception is thrown:
> {code:java}
> System.NullReferenceException: Object reference not set to an instance of an object.
> at at Amqp.Session..ctor(Connection connection, Begin begin, OnBegin onBegin)
> at Apache.NMS.AMQP.Provider.Amqp.AmqpSession.Start() in C:\git\activemq-nms-amqp\src\NMS.AMQP\Provider\Amqp\AmqpSession.cs:71
> at Apache.NMS.AMQP.Provider.Amqp.AmqpConnection.CreateSession(NmsSessionInfo sessionInfo) in C:\git\activemq-nms-amqp\src\NMS.AMQP\Provider\Amqp\AmqpConnection.cs:150{code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)