[ 
https://issues.apache.org/jira/browse/AMQNET-633?focusedWorklogId=372974&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-372974
 ]

ASF GitHub Bot logged work on AMQNET-633:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Jan/20 12:22
            Start Date: 16/Jan/20 12:22
    Worklog Time Spent: 10m 
      Work Description: michaelandrepearce commented on pull request #52: 
AMQNET-633: Fix session creation when connection not started
URL: https://github.com/apache/activemq-nms-amqp/pull/52
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 372974)
    Time Spent: 0.5h  (was: 20m)

> 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 Porebski
>            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)

Reply via email to