Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 70883 invoked from network); 10 Oct 2007 23:52:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Oct 2007 23:52:03 -0000 Received: (qmail 52606 invoked by uid 500); 10 Oct 2007 23:51:41 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 52581 invoked by uid 500); 10 Oct 2007 23:51:41 -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 52569 invoked by uid 99); 10 Oct 2007 23:51:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2007 16:51:41 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS 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; Wed, 10 Oct 2007 23:51:42 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IflKk-0002U8-Hp for dev@activemq.apache.org; Wed, 10 Oct 2007 16:51:22 -0700 Message-ID: <13147041.post@talk.nabble.com> Date: Wed, 10 Oct 2007 16:51:22 -0700 (PDT) From: semog To: dev@activemq.apache.org Subject: Re: NMS implementation for Websphere MQ using C# In-Reply-To: <13142132.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: <13007420.post@talk.nabble.com> <13023709.post@talk.nabble.com> <13040887.post@talk.nabble.com> <13045212.post@talk.nabble.com> <13142132.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Craig Selbert wrote: > > Jim, > > Thanks for the information. If you could please post the sample you > talked about that would be great. > > Craig > Hi Craig, Here you go. This is based on the changes that I am contributing. Still working through all of the legal due diligence, but I think the contribution will be committed to the mainline soon. using System; using Apache.NMS; namespace Apache.TibcoEMS.Test { class TestTibco { static void Main(string[] args) { IConnectionFactory connectionFactory = NMSFactory.CreateConnectionFactory("tibco:tcp://testmachine:7222", "TestTibcoClient"); if(null != connectionFactory) { using(IConnection connection = connectionFactory.CreateConnection("guest", "guest")) using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)) { IQueue publishQueue = session.GetQueue("TestQueue"); using(IMessageProducer producer = session.CreateProducer(publishQueue)) using(IMessageConsumer consumer = session.CreateConsumer(publishQueue)) { // Send a message to the queue we are consuming on. ITextMessage message = producer.CreateTextMessage("Hello, NMS!"); // Start receiving connection messages. connection.Start(); producer.Send(message); ITextMessage reply = consumer.Receive() as ITextMessage; if(null != reply) { Console.WriteLine(reply.Text); } else { Console.WriteLine("You never write messages anymore!"); } } } } else { Console.Write("Error creating connection factory."); } } } } -- View this message in context: http://www.nabble.com/NMS-implementation-for-Websphere-MQ-using-C--tf4557901s2354.html#a13147041 Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.