activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From semog <>
Subject Re: Patch for NMS ConnectionFactory problem with ASP.NET
Date Thu, 20 Nov 2008 01:26:29 GMT

Hi Dan,

I applied the patch to the code base.  The change I put in is not exactly
what you submitted, but it is based on that.  I broke out the path lookup
into a separate function, and this helped clean up the code a bit.  Take a
look at the change and verify that it still works for you, and that you
agree with my modifications.  If not, let me know.

Thanks for contributing this.  It's a great addition.

- Jim

Daniel Ellis wrote:
> Hello,
> Good to see the NMS trunk is back up to speed and passing the unit tests. 
> This morning I had a problem getting the connection factory to work within
> ASP.NET and believe it may not be possible with the current
> implementation.
> Currently the function 'LookupConnectionFactoryInfo' obtains the path to
> the nmsprovider.config file by looking in the directory of the currently
> executing assembly.  However ASP.NET does not run the assembly where the
> DLL is located.  Instead the DLL is copied to a path deep within the
> ASP.NET temporary files folder.
> The attached patch now checks three folders:-
> * Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
> * AppDomain.CurrentDomain.BaseDirectory;
> * AppDomain.CurrentDomain.RelativeSearchPath;
> I have tested this and it now works with both a service and an
> webapp.  I have done my best not to break the compact framework build, but
> have not managed to build that yet.  Is this a suitable implementation?
> NMSConnectionFactory-aspnet.patch 
> Regards,
> Dan

View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message