[ 
https://issues.apache.org/activemq/browse/AMQNET-204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish closed AMQNET-204.
-------------------------------

    Resolution: Incomplete

no included test case or instructions for reproducing the error.

> ConnectionFactory for NETCF is always returning DEFAULT_BROKER_URL which is 
> localhost
> -------------------------------------------------------------------------------------
>
>                 Key: AMQNET-204
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-204
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>         Environment: Discovered when testing on a Windows CE device running 
> CF2.0 - reproduced in Visual Studio but using NETCF
>            Reporter: Jeff Smith
>            Assignee: Jim Gomes
>
> In NMSConnectionFactory.cs, there is # define for NETCF that is causing this 
> line of code to execute:
> connectionFactory = (IConnectionFactory) 
> Activator.CreateInstance(factoryType);
> But that signature for CreateInstance does not take the parameters like the 
> line in the #else:
> object[] parameters = MakeParameterArray(uriProvider, constructorParams);
> connectionFactory = (IConnectionFactory) 
> Activator.CreateInstance(factoryType, parameters);
> Because of that, the ConnectionFactory.cs class is returning the 
> DEFAULT_BROKR_URL which contains "localhost".  This is bad.  This is assuming 
> that the broker is running on the mobile device which is not our case.  We 
> need our mobile devices to connect to a centralized message broker.  
> We removed the #if and let it run the version in the #else and it seems to 
> work correctly now without adverse effects but I did not study all the 
> ramifications of removing this #if.  Is the developer who put this in able to 
> tell us why that was there?
> I see the #if in ConnectionFactory where you stop CF from doing the 
> Environment call.  I guess mobile devices do not have Environment variables?  
> But that #if doesn't matter in our case.  The root cause of the problem is 
> the fact that we need to call the right version of CreateInstance that passes 
> parameters.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to