Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 96807 invoked from network); 15 Jun 2010 13:30:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jun 2010 13:30:44 -0000 Received: (qmail 66313 invoked by uid 500); 15 Jun 2010 13:30:44 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 66199 invoked by uid 500); 15 Jun 2010 13:30:42 -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 66191 invoked by uid 99); 15 Jun 2010 13:30:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 13:30:42 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.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; Tue, 15 Jun 2010 13:30:35 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OOWDW-0007Je-QM for users@activemq.apache.org; Tue, 15 Jun 2010 06:30:14 -0700 Message-ID: <28891335.post@talk.nabble.com> Date: Tue, 15 Jun 2010 06:30:14 -0700 (PDT) From: boevink To: users@activemq.apache.org Subject: Re: Howto setup JNDI Federation In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: peter.boevink@ovsoftware.com References: <28888636.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org It doesn't have to be populated automatically, it ok to have a little jndi app. But how do I bind a ActiveMQ context to an object within my LDAP server? I have a DirContext for my LDAP Server called "ldapctx". Now i would like to bind an activeMQ context like this: Properties envJms = new Properties(); envJms.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.activemq.jndi.ActiveMQInitialContextFactory"); envJms.put(Context.PROVIDER_URL, "tcp://development:61616"); DirContext jmsCtx = new InitialDirContext(envJms); ldapctx.bind("cn=activeMQ", jmsCtx); But that fails with the following exception: javax.naming.NotContextException: Not an instance of DirContext; remaining name 'cn=activeMQ' at javax.naming.directory.InitialDirContext.getURLOrDefaultInitDirCtx(InitialDirContext.java:92) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:123) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:118) at com.sun.jndi.ldap.Obj.determineBindAttrs(Obj.java:551) at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:385) at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:354) at com.sun.jndi.toolkit.ctx.ComponentContext.p_bind(ComponentContext.java:596) at com.sun.jndi.toolkit.ctx.PartialCompositeContext.bind(PartialCompositeContext.java:183) at com.sun.jndi.toolkit.ctx.PartialCompositeContext.bind(PartialCompositeContext.java:173) Gary Tully wrote: > > There is no easy way to automatically populate a third party jndi provider > with ActriveMQ objects, you would need to code up a little jndi app that > can > bind the objects that you need. It would be a neat extension to > activemq-admin though if you want to contribute. > > see a previous discussion for some ideas: > http://old.nabble.com/Generating-.bindings-file-for-RefFSContextFactory-tt28512685.html#a28523033 > -- View this message in context: http://old.nabble.com/Howto-setup-JNDI-Federation-tp28888636p28891335.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.