From activemq-users-return-6248-apmail-geronimo-activemq-users-archive=geronimo.apache.org@geronimo.apache.org Wed Dec 13 12:44:36 2006 Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 37963 invoked from network); 13 Dec 2006 12:44:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Dec 2006 12:44:35 -0000 Received: (qmail 31264 invoked by uid 500); 13 Dec 2006 12:44:43 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 31056 invoked by uid 500); 13 Dec 2006 12:44:42 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 31047 invoked by uid 99); 13 Dec 2006 12:44:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Dec 2006 04:44:42 -0800 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [209.191.125.120] (HELO web38914.mail.mud.yahoo.com) (209.191.125.120) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 13 Dec 2006 04:44:30 -0800 Received: (qmail 10965 invoked by uid 60001); 13 Dec 2006 12:44:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=TT0C0KU6YX/n5VikHjThxWi2ZWp7f2IXXd35jBycolSMUAlQRot19Su7R9do8ObJPAxJ+5mzX1bVjMX185+yizwiHz7PLeyUcCTJEcFmQPuq/rC+OodIwuSPiB0UMRHEFXWQj1D0zfkTPHf6jy8djQPrOU9zFlfoVbT1aXiKUxU= ; Message-ID: <20061213124408.10963.qmail@web38914.mail.mud.yahoo.com> Received: from [212.252.214.206] by web38914.mail.mud.yahoo.com via HTTP; Wed, 13 Dec 2006 04:44:08 PST Date: Wed, 13 Dec 2006 04:44:08 -0800 (PST) From: Ali Sadik Kumlali Subject: How can I enable principle and credentials for embedded broker? To: activemq-users@geronimo.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi folks,=0A=0AI've been walking through the documentation, mailing list an= d Google for a while but couldn't get a solution to my problem.=0A=0AI need= to;=0A1) Use embedded broker=0A2) Access initial context by providing user= name(SECURITY_PRINCIPAL) and password(SECURITY__CREDENTIALS)=0A3) Create co= nnections by providing username and password=0A =0AFor standalone case, I m= anaged to do 3) by following the instructions[1]. But couldn't find a way f= or 2) either.=0A=0AHere is the code snippet:=0A=0A-------------------------= ---------------------=0A// Server initialization=0ABrokerService broker =3D= new BrokerService();=0Abroker.addConnector("tcp://localhost:61616");=0Abro= ker.start();=0A=0A=0A// Client initialization=0AProperties props =3D new Pr= operties();=0Aprops.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.apache= .activemq.jndi.ActiveMQInitialContextFactory");=0Aprops.setProperty(Context= .PROVIDER_URL,"tcp://localhost:61616");=0Aprops.setProperty(Context.SECURIT= Y_PRINCIPAL, "contextUser");=0Aprops.setProperty(Context.SECURITY__CREDENTI= ALS, "contextPassword");=0A=0AContext jndiContext =3D new InitialContext(pr= ops);=0A...=0AConnection connection =3D connectionFactory.createConnection(= "connUser", "connPassword");=0A--------------------------------------------= --=0A=0A=0ANow, how can I configure embedded broker to make it require cont= extUser, contextPassword, connUser and connPassword?=0A=0AAny help would be= appreciated.=0A=0ARegards,=0A=0AAli Sadik Kumlali=0A=0A=0A[1] http://www.a= ctivemq.org/site/security.html=0A=0A=0A=0A=0A=0A=0A=0A =0A_________________= ___________________________________________________________________=0AAny q= uestions? Get answers on any topic at www.Answers.yahoo.com. Try it now.