Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 77802 invoked from network); 31 Dec 2009 11:06:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Dec 2009 11:06:54 -0000 Received: (qmail 62539 invoked by uid 500); 31 Dec 2009 11:06:53 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 62515 invoked by uid 500); 31 Dec 2009 11:06:53 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 62505 invoked by uid 99); 31 Dec 2009 11:06:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 11:06:53 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tammer.salem@googlemail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 11:06:43 +0000 Received: by fg-out-1718.google.com with SMTP id 16so11886782fgg.14 for ; Thu, 31 Dec 2009 03:06:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=B4F0NBTjFPyDbc6HfO6T0C6FXjrWrCbZ131FnlXfmaw=; b=CUBGma6NGwF+pQiOjcYCvDcCxdnUZrZ1BLIG3zq3SReo/fVVzv9T2p/9PVUl0rylL7 q3nUezNzPV4cSEAgKEkHSGiprXcjH522us6vnM8Ujos8SbcWjMCwXb1k+V+uJMBndgKr +9JIKh4QIfV7Wy5TLEXCU86eUhlrDXSsFMieU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=mp18kphiMqLjDi7CMPYhu3S7EVde9qB6eglpp2iHqLNX4wMV8Dfpzdt804r/Dmau3l fzckJUxawHxJCO2vQxwdO+Y4HaBgioDUIgsfPJc1OG625+zLk6NzS75rM91YvxUt6qzV rd3i3JQbd/uJGa6XK6TJAP5QAwJt8MN7x/q9k= MIME-Version: 1.0 Received: by 10.239.139.154 with SMTP id t26mr2283167hbt.74.1262257582347; Thu, 31 Dec 2009 03:06:22 -0800 (PST) In-Reply-To: <1262182447.2426.1.camel@localhost> References: <6158fb10912231847q2292b766i619921925de3322e@mail.gmail.com> <92c409f80912250538n7cc7b6f1v8add2f677e515b08@mail.gmail.com> <6158fb10912300605g4c63d59dree5343ffdc6cb8f7@mail.gmail.com> <1262182447.2426.1.camel@localhost> Date: Thu, 31 Dec 2009 13:06:22 +0200 Message-ID: <6158fb10912310306g426a8901sd65d971e2d0c09f8@mail.gmail.com> Subject: Re: Using NMS with .NET Compact Framework From: Tammer Salem To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=001485f5b092cf97dd047c043e4c X-Virus-Checked: Checked by ClamAV on apache.org --001485f5b092cf97dd047c043e4c Content-Type: text/plain; charset=ISO-8859-1 Yes I've got reference to: Apache.NMS.ActiveMQ.dll Apache.NMS.dll And I'm using 1.1.0 under the assumption that it is a full release and hence more stable than 1.2.0 do you suggest using 1.2.0? regards, Tammer 2009/12/30 Timothy Bish > On Wed, 2009-12-30 at 16:05 +0200, Tammer Salem wrote: > > Thanks Tim - I figured that NMS NETCF support was not completely > implemented > > - hence not supported. > > > > I actually changed the implementation slightly and am getting errors > trying > > to find the nmsprovider-activemq.config file when debugging. The file is > in > > the same folder as the executable and it still says the file does not > exist > > - so I keep getting an exception: > > No IConnectionFactory implementation found for connection URI: > > activemq:tcp://192.168.1.118:80 > > Is the Apache.NMS.ActiveMQ.dll in your projects references? Without the > actual ActiveMQ implementation of NMS the NMSConnectionFactory isn't > going to be able to do much. If you are using the NMS 1.2 release > candidates you don't need the configuration file, just the DLLs. > > Regards > Tim. > > > > > Here is the code I'm trying to use: > > > > ======================================== > > using System; > > using System.Threading; > > using Apache.NMS; > > using Apache.NMS.Util; > > > > namespace Apache.NMS.ActiveMQ.Test > > { > > public class TestMain > > { > > protected static AutoResetEvent semaphore = new > > AutoResetEvent(false); > > protected static ITextMessage message = null; > > protected static TimeSpan receiveTimeout = > TimeSpan.FromSeconds(10); > > > > public static void Main(string[] args) > > { > > > > Uri connecturi = new Uri("activemq:tcp://192.168.1.118:80"); > > > > Console.WriteLine("About to connect to " + connecturi); > > > > IConnectionFactory factory = new > > NMSConnectionFactory(connecturi); > > > > using (IConnection connection = factory.CreateConnection()) > > using (ISession session = connection.CreateSession()) > > { > > IDestination destination = > > SessionUtil.GetDestination(session, "queue://FOO.BAR"); > > Console.WriteLine("Using destination: " + destination); > > > > using (IMessageConsumer consumer = > > session.CreateConsumer(destination)) > > using (IMessageProducer producer = > > session.CreateProducer(destination)) > > { > > connection.Start(); // Must start the connection > for > > async messaging. > > producer.RequestTimeout = receiveTimeout; > > consumer.Listener += new MessageListener(OnMessage); > > > > // Send a message > > ITextMessage request = > session.CreateTextMessage("Hello > > World!"); > > request.NMSCorrelationID = "abc"; > > request.Properties["NMSXGroupID"] = "cheese"; > > request.Properties["myHeader"] = "Cheddar"; > > > > producer.Send(request); > > > > // Wait for the message > > > semaphore.WaitOne((int)receiveTimeout.TotalMilliseconds, > > true); > > if (message == null) > > { > > Console.WriteLine("No message received!"); > > } > > else > > { > > Console.WriteLine("Received message with ID: " > + > > message.NMSMessageId); > > Console.WriteLine("Received message with text: " > + > > message.Text); > > } > > } > > } > > } > > > > protected static void OnMessage(IMessage receivedMsg) > > { > > message = receivedMsg as ITextMessage; > > semaphore.Set(); > > } > > } > > } > > ==================================== > > > > > > If a stomp client is being worked on - I'll probably wait for that - in > the > > meantime I'm looking at using XMPP for NETCF with activemq. > > > > Thanks for taking the time to respond - happy holidays everyone! > > > > > > 2009/12/25 Timothy Bish > > > > > On Wed, Dec 23, 2009 at 9:47 PM, Tammer Salem > > > wrote: > > > > > > > Hello All, > > > > I'm trying to create a .NET CF 2.0 application that can listen to > > > messages > > > > from activemq and update a UI based on the message. > > > > I've been trying to get the IMessageConsumer interface working but > for > > > some > > > > reason VS2008 doesn't recognize this as a valid interface from > > > > the Apache.NMS.dll > > > > Has anyone encountered this before? > > > > > > > > > > > Your VS2008 project will need to reference both the NMS and > NMS.ActiveMQ > > > DLLs in order to work correctly. That could be the issue, if you post > a > > > sample of you code I can tell you if there's any issue with your usage > of > > > the API. > > > > > > > > > > Is this the accepted way of doing this? I'm not too bothered by the > form > > > of > > > > communication, just the fact that I can create a listener on a > separate > > > > thread that can receive activemq messages. > > > > > > > > The documentation is very light, and I read a Nabble response saying > that > > > > .netcf is no longer supported? Can someone shed some light on this, > and > > > if > > > > possible point me to some examples or documentation? > > > > > > > > > > > > > The ActiveMQ client no longer supports the .NETCF, work has started on > a > > > smaller Stomp based client that will work on .NETCF but its not yet > > > complete. You are welcome to contribute to the project if you'd like, > > > currently basic functionality is there but things like transactions > aren't > > > tested yet and the code needs some work to build on the CF. > > > > > > I'd recommend that you get comfortable with the NMS.ActiveMQ client and > > > hopefully the Stomp client will have a release out in the next month or > so. > > > > > > Regards > > > Tim. > > > > > > > > > > > > > > > > > > > > regards, > > > > Tammer Salem > > > > > > > > > -- > Tim Bish > http://fusesource.com > http://timbish.blogspot.com/ > > > > --001485f5b092cf97dd047c043e4c--