Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 26627 invoked from network); 8 Jul 2008 11:14:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jul 2008 11:14:09 -0000 Received: (qmail 50311 invoked by uid 500); 8 Jul 2008 11:14:09 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 50283 invoked by uid 500); 8 Jul 2008 11:14:09 -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 50272 invoked by uid 99); 8 Jul 2008 11:14:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2008 04:14:09 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 64.233.184.224 as permitted sender) Received: from [64.233.184.224] (HELO wr-out-0506.google.com) (64.233.184.224) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2008 11:13:15 +0000 Received: by wr-out-0506.google.com with SMTP id 50so1898757wri.2 for ; Tue, 08 Jul 2008 04:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=p7NG7PcuHOodYDCRbME8doxJZwygpGWiUiCyG3TyViA=; b=slVGYGxe3hxOERgMqVk3GY2364nmpnDkJE2B5y7dk6TNLh9SyZsBr+OvS3rhrJ6PF+ gQ9hgdBbQveIiUj1snO2kK2t+RpuathHvcrh2KGqfZ1oBlA57Wn4PGa1247KhU9qDi9s RDo2VlU3iQiBCcZbxoSsvceoypSTxW39H50ss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=R9X789K3Oib8qEh0FdxhWv6GiuN3/MdD8/dcMUVrPro6TcepsZYTTg4q6W40wTEVGf xSszvACW75YkeRE+feBiMaYL6ewHEdyCmzsp1UwXCCQnpLp6Sz6to8vUzKaMvVUyO34a 15S5WCwWZOtDx93VHm39ksPoeOkOF7InifVp8= Received: by 10.90.101.7 with SMTP id y7mr6799540agb.13.1215515616309; Tue, 08 Jul 2008 04:13:36 -0700 (PDT) Received: by 10.90.82.6 with HTTP; Tue, 8 Jul 2008 04:13:36 -0700 (PDT) Message-ID: Date: Tue, 8 Jul 2008 12:13:36 +0100 From: "James Strachan" To: users@activemq.apache.org Subject: Re: ActiveMQ & Camel In-Reply-To: <18336458.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <18336458.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org You can customize the activemq component in your spring.xml to specify the user/password and to switch from the default TCP transport to use VM if you prefer. See... http://activemq.apache.org/camel/activemq.html 2008/7/8 Yari : > > Hi everyone, > i started working on ActiveMQ for a few days and i wanna share an experience > i found out to be interesting (and could save a lot of time) to other > people.The project i work on required JAAS, for authentication and > authorization, as well as Camel, in order to integrate Enterprise > Integration Patterns. We decided to start building what we need with a > simple content based router using the EL scripting language. > > So the first thing was to download the camel-juel jar from > http://people.apache.org/repo/m2-snapshot-repository/org/apache/camel/camel-juel/ > and saved in the activemq lib/ directory. > > Then we edited the activemq.xml configuration with: > > xmlns="http://activemq.apache.org/camel/schema/spring"> > > > > > ${in.headers['TESTHEADER'] == 'TEST' } > > > > > > > > > > and we tried starting the broker, and everything was fine, the routing was > able to dispatch to the correct queue based on headers (so messages with > TESTHEADER equals to TEST were dispatched to QUEUE.BAR, everything else to > QUEUE.BUZZ). > > We then tried to enable JAAS authentication and authorization with: > > > > > > setting everything up like explained in > http://activemq.apache.org/security.html. > When we tried to start the broker we end up with: > > java.lang.SecurityException: User name or password is invalid > (and a bunch of stack traces) > > After a lot of work we were able to understand that, when Camel is started > it tries to connect to the broker in order to create queues and topic > required for routing (in the above example to create QUEUE.FOO, > QUEUE.BAR,QUEUE.BUZZ). Obviously, since there's an authorization required to > access the broker, and you can't provide Camel with a username and a > password (or at least we weren't able to find a way to do that), it cannot > authenticate and so it cannot do anything > > Just to save some work to some of you, remember that you cannot provide > Camel with connection informations as well, so, for example, if you have a > machine with an IP 192.168.0.1 and you change: > > > /> > > > ,which will bind your broker to both 127.0.0.1 and 192.168.0.1, to > > > /> > > > Camel won't work as well, because it won't be able to connect to the broker, > so it won't be able to install routes. > > So we ended up disabling JAAS plugin, in order to be able to use Camel. Now > i have some questions: > > 1) Is there any way to pass a username and a password to Camel? and if it > isn't, is there any plan to implement such feature? > 2) why is Camel using a TCP connection instead of direct methods invocation? > 3) is there any documentation about this problem which maybe i missed? > > best regards, > Yari > -- > View this message in context: http://www.nabble.com/ActiveMQ---Camel-tp18336458p18336458.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com