Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 15403 invoked from network); 12 Oct 2007 21:47:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Oct 2007 21:47:16 -0000 Received: (qmail 66254 invoked by uid 500); 12 Oct 2007 18:57:03 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 66227 invoked by uid 500); 12 Oct 2007 18:57:03 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 66216 invoked by uid 99); 12 Oct 2007 18:57:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 11:57:03 -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: local policy) Received: from [69.147.95.73] (HELO smtp110.plus.mail.sp1.yahoo.com) (69.147.95.73) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 12 Oct 2007 18:57:06 +0000 Received: (qmail 57185 invoked from network); 12 Oct 2007 18:56:46 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=d05k8Unj/G5bpa6iIv6J+YklkIhI8SBlIBC7o0MxBbFHu8/BxTJX0K/7kgHvE0i8M4RpP/tZTnkB+7mbfei4moiOPlq8065tFgAu24PkNiiQGCw5gcWpJCgHCwgqT/M5ZcW1A1dMH6Rrsv/R0hTYtosHyuNfKF2dIm0KDDsNP+8= ; Received: from unknown (HELO ?192.168.1.101?) (david_jencks@67.102.173.8 with plain) by smtp110.plus.mail.sp1.yahoo.com with SMTP; 12 Oct 2007 18:56:46 -0000 X-YMail-OSG: qMTA5qoVM1l8gw_y5rf5GAFS6BWCABnPFrh5G_PFnrbyCLJfn8.K8vm9z0pGkFqbEJUEz9WY3w-- Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9CF4CDEB-8361-417F-8B16-94B046426077@yahoo.com> Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: how to look up MEJB Date: Fri, 12 Oct 2007 11:57:05 -0700 To: user@geronimo.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org the java:comp/env only works when called from javaee components, not gbeans. You could use a gbean reference to the EjbContainer (??) gbean that is deployed when the ejb is deployed and then figure out what to call to get the MEJB itself. Or, if this gbean is called from javaee components you could look up the MEJB during such a call, and make sure you have an ejb-ref to it in the javaee component. thanks david jencks On Oct 12, 2007, at 10:10 AM, Viet Nguyen wrote: > Hi All, > > I am trying to access the new MEJB from a gbean. I am using the > following > > Context ic = new InitialContext(); > Object mejbObj = (Object)ic.lookup("java:comp/env/ejb/mgmt/ > MEJB"); // I get a NotContextException here > > I have tried to pass a Properties object (with the > javax.naming.security.principal and > javax.naming.security.credentials) to the InitialContext() > constructor, but I get the same exception. > > I think this is the correct JNDI name for MEJB. Is this problem due > to the new security checks? If so, how can I configure my gbean > (which is actually bundled inside an EAR) to be able to access the > MEJB? > > Thanks, > Viet