Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 41834 invoked from network); 20 Nov 2008 01:27:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Nov 2008 01:27:02 -0000 Received: (qmail 36687 invoked by uid 500); 20 Nov 2008 01:27:10 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 36653 invoked by uid 500); 20 Nov 2008 01:27:10 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 36642 invoked by uid 99); 20 Nov 2008 01:27:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Nov 2008 17:27:10 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2008 01:25:45 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L2yJR-0004dk-Ef for dev@activemq.apache.org; Wed, 19 Nov 2008 17:26:29 -0800 Message-ID: <20593340.post@talk.nabble.com> Date: Wed, 19 Nov 2008 17:26:29 -0800 (PST) From: semog To: dev@activemq.apache.org Subject: Re: Patch for NMS ConnectionFactory problem with ASP.NET In-Reply-To: <20563084.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: e.semog@gmail.com References: <20563084.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org 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 asp.net > 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? > > http://www.nabble.com/file/p20563084/NMSConnectionFactory-aspnet.patch > NMSConnectionFactory-aspnet.patch > > Regards, > Dan > -- View this message in context: http://www.nabble.com/Patch-for-NMS-ConnectionFactory-problem-with-ASP.NET-tp20563084p20593340.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.