Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 40138 invoked from network); 2 Oct 2008 01:31:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Oct 2008 01:31:10 -0000 Received: (qmail 27909 invoked by uid 500); 2 Oct 2008 01:31:09 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 27880 invoked by uid 500); 2 Oct 2008 01:31:09 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 27869 invoked by uid 99); 2 Oct 2008 01:31:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 18:31:09 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ryebrye@gmail.com designates 209.85.198.244 as permitted sender) Received: from [209.85.198.244] (HELO rv-out-0708.google.com) (209.85.198.244) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2008 01:30:05 +0000 Received: by rv-out-0708.google.com with SMTP id f25so731772rvb.26 for ; Wed, 01 Oct 2008 18:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=te0Tpsc+R1L6Eh6AzGoDqP4QRWJV4ai2H67clBQUVh0=; b=jaLjz6n6JR6Ejp5fj0K+muez1gSQ0tMPKaDmENpmLTOFfkdDFnPlsBXrLs+Ral1QGF qIkFu9y3+X79OdlEf8lMPFUvcUn42AB+RDdLDGYBdrPW6RsB6xwoxNQI4XL2u//YI4SG L3W00ky1E8+tiskaHqiYAXDiOI/cN7DtYXXH0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=Q7l/PFeMg+hrpcwQY0j0GUbO9MTREcsAWki3q2M5ZkMS2ZoXmX61WymHYjP1c59HJL s6tU7f7E2DSElta3btSxj4hY9fI5aDx3PQebx62rjYFWB6/7zSz/EQAx5Tn+1IasHHUf HU/RP7F8OZc1T0YqKlPBBw6xiikbgHATLqNDM= Received: by 10.114.155.1 with SMTP id c1mr10146898wae.24.1222911039802; Wed, 01 Oct 2008 18:30:39 -0700 (PDT) Received: from ?10.14.19.80? ([160.7.248.108]) by mx.google.com with ESMTPS id v39sm2757018wah.40.2008.10.01.18.30.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Oct 2008 18:30:39 -0700 (PDT) Message-Id: <61B5FC20-458D-4FC2-9539-8EF8785C75C3@gmail.com> From: Ryan Gardner To: camel-user@activemq.apache.org In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: Camel, activemq endpoints, and jndi Date: Wed, 1 Oct 2008 19:30:36 -0600 References: <3A619151-44A4-432E-9F3B-CD54156E88E5@gmail.com> <4C1FB9C00D24A140906239533638C4D2058FB2CD@EXVS04.exserver.dk> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org Ok, I got it working. The dynamicTopics and dynamicQueues are DEFINITELY the way to go - =20 much simpler than configuring every destination in JNDI. The jndi.properties I used was pretty much the one in the activemq =20 settings page. The trick for me was getting blazeDS's jms adapter to =20 have the context configured correctly and find it properly. In case anyone else wants to use Camel + ActiveMQ + BlazeDS + Flex to =20= build messaging channels for their RIA - here's what a working BlazeDS =20= messaging-config.xml file looks like: Topic javax.jms.TextMessage topicConnectionFactory dynamicTopics/SMSReturnMessages NON_PERSISTENT DEFAULT_PRIORITY AUTO_ACKNOWLEDGE Context.INITIAL_CONTEXT_FACTORY =20 org.apache.activemq.jndi.ActiveMQInitialContextFactory Context.PROVIDER_URL vm://localhost This goes along with the service-config.xml file that defines the =20 different streaming channels... etc. It's true that BlazeDS doesn't =20 really talk to camel at all, but by having camel involved it obviously =20= opens up a great number of possibilities for some pretty cool =20 applications. Thanks for the pointers. Ryan On Oct 1, 2008, at 3:08 AM, James Strachan wrote: > Agreed with everything Claus just said - that JNDI support page > describes how to setup JNDI to include the various destinations. Also > look at the "Dynamically creating destinations" section - its a JNDI > naming convention to avoid you having to configure each destination! > Saves loads of hassle with JNDI. > > Note that BlazeDS will be using the JMS API and JNDI directly - it > won't be using Camel at all. You then just use the actual JMS > queue/topic names you are using in Camel land - you don't need to mess > around with all that JNDI muck unless you really want to - I'd > recommend avoiding it to be honest; its just another level of > indirection that just adds complexity for no real use. > > e.g. imagine if each URI in a web app had to be looked up, by another > name, in JNDI before you could use it in a web app - how hard would > servlets/HTML be? > > 2008/10/1 Claus Ibsen : >> Hi >> >> Ah that is more an ActiveMQ question than Camel. How to register =20 >> activemq queues in a JNDI tree. >> >> A valid question I would like to know how to as well ;) >> >> Try go to >> http://activemq.apache.org >> and enter jndi in the search field >> >> http://activemq.apache.org/jndi-support.html >> >> But I am sure James or the other activemq experts will be able to =20 >> give a better hint. >> >> >> >> Med venlig hilsen >> >> Claus Ibsen >> ...................................... >> Silverbullet >> Skovsg=E5rdsv=E6nget 21 >> 8362 H=F8rning >> Tlf. +45 2962 7576 >> Web: www.silverbullet.dk >> >> -----Original Message----- >> From: Ryan Gardner [mailto:ryebrye@gmail.com] >> Sent: 1. oktober 2008 05:03 >> To: camel-user@activemq.apache.org >> Subject: Camel, activemq endpoints, and jndi >> >> I'm working with Camel, Spring, and Flex - using BlazeDS to interface >> with my flex clients. The server is running on tomcat. >> >> BlazeDS has support out of the box for adapting a JMS channel to a >> flex client and handling messages passed back and forth to the flex >> client. The default way to use the BlazeDS JMS adapter invovles >> retrieving the endpoints from JNDI. >> >> What's the best way to get Camel to register activemq jms endpoints =20= >> in >> JNDI? >> >> Here's a snippet of what the JMS configuration looks like in the XML >> file that configures the BlazeDS server: >> >> ---- >> >> >> >> Topic >> javax.jms.TextMessage >> java:comp/env/jms/flex/ >> TopicConnectionFactory >> java:comp/env/jms/SomeJMSEndpoint> destination-jndi-name> >> NON_PERSISTENT >> DEFAULT_PRIORITY >> AUTO_ACKNOWLEDGE >> >> >> Context.INITIAL_CONTEXT_FACTORY >> >> org.apache.activemq.jndi.ActiveMQInitialContextFactory >> >> >> Context.PROVIDER_URL >> tcp://localhost:61616 >> >> >> >> >> >> >> ----- >> >> So the easiest thing would be if I could get my endpoints to be >> registered in JNDI so that the line: >> >> java:comp/env/jms/SomeJMSEndpoint> destination-jndi-name> >> >> would just find the JMS queue and I'd be good to go. >> >> Any tips from those more familiar with JMS than I am? (which is most >> anyone on this list, I'm sure) >> >> Ryan >> > > > > --=20 > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://open.iona.com