Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 17270 invoked from network); 31 Mar 2006 09:59:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Mar 2006 09:59:28 -0000 Received: (qmail 95335 invoked by uid 500); 31 Mar 2006 09:59:08 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 95051 invoked by uid 500); 31 Mar 2006 09:59:07 -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 95038 invoked by uid 99); 31 Mar 2006 09:59:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2006 01:59:07 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of olivier.voutat@gmail.com designates 64.233.162.202 as permitted sender) Received: from [64.233.162.202] (HELO zproxy.gmail.com) (64.233.162.202) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2006 01:59:06 -0800 Received: by zproxy.gmail.com with SMTP id o37so810623nzf for ; Fri, 31 Mar 2006 01:58:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=M/tKou2lsOrqMVKBYUeUOogQdHwUnbOXgraH0BdIXdH6uxf+fePgjhhSQYRrQ1Ec02zMMZrAeuKpo6S6Hp65JIlUaOz8P831lrWJoTkfO65o8HCxiTwM55HcIkTLmG1wnQ4fG1OPNWe9PK323y4x1Kik89PbQphvTgWl9ROMGsQ= Received: by 10.65.75.19 with SMTP id c19mr143875qbl; Fri, 31 Mar 2006 01:58:45 -0800 (PST) Received: by 10.65.211.15 with HTTP; Fri, 31 Mar 2006 01:58:45 -0800 (PST) Message-ID: <124d285e0603310158u5fac380q6bf8075118a611aa@mail.gmail.com> Date: Fri, 31 Mar 2006 06:58:45 -0300 From: "Olivier Voutat" To: user@geronimo.apache.org Subject: Re: Accessing locally Container Beans In-Reply-To: <466797bd0603302213s7f791545s4091e9a6c7a027f@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19163_5804850.1143799125985" References: <124d285e0603300459l4f540a76v29ff007792699297@mail.gmail.com> <466797bd0603302213s7f791545s4091e9a6c7a027f@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_19163_5804850.1143799125985 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline You mean like this in the ejb-jar.xml ? LookupName EntityBeanName but if I do it this way, how I create the context ? Like this: Context ctx =3D new InitialContext(); //without parameters ? Best Regards, Olivier Voutat On 3/31/06, Manu George wrote: > > Hi Olivier, > You need not pass any properties to the InitialContext for > local lookups from other components running in the server. You only need = to > give an ejb-ref in the deployment descriptor. You can get more info on th= is > from Aaron's book > > http://www.chariotsolutions.com/geronimo/geronimo-html-one-page.html > > There are also many examples in developerworks and confluence > > Regards > Manu > > > On 3/30/06, Olivier Voutat wrote: > > > > To do the remote lookup for a bean I was setting my properties like thi= s > > : > > > > > > -----------------------------------------------------------------------= ----------------------------------------------------------- > > prop.put("java.naming.factory.initial"," > > org.openejb.client.RemoteInitialContextFactory"); > > > > prop.put("java.naming.provider.url","localhost:4201"); > > > > prop.put("java.naming.security.principal","system"); > > > > prop.put("java.naming.security.credentials","manager"); > > > > -----------------------------------------------------------------------= ----------------------------------------------------------- > > > > I was researching and found that local calls should use: > > > > > > -----------------------------------------------------------------------= ----------------------------------------------------------- > > prop.put("java.naming.factory.initial"," > > org.openejb.client.LocalInitialContextFactory"); > > > > -----------------------------------------------------------------------= ----------------------------------------------------------- > > but the question is (and I'm asking because I didn't had enough time to > > keep testing) do I need the other properties lines ? Think not because = it is > > a internal container lookup but would like to be sure. > > > > Best Regards, > > Olivier Voutat > > > > -- > > Olivier & Cidiane Voutat > > Rua Praia de Muri=FA, 9188 > > Cep 59092-390 / Natal - RN > > Tel: (84) 3219-0427 Cel: (84) 9977-3917 > > > > -- Olivier & Cidiane Voutat Rua Praia de Muri=FA, 9188 Cep 59092-390 / Natal - RN Tel: (84) 3219-0427 Cel: (84) 9977-3917 ------=_Part_19163_5804850.1143799125985 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline You mean like this in the ejb-jar.xml ?

  <resource-re= f>
    <ref-name>LookupName</ref-name>= ;
    <resource-link>EntityBeanName</resour= ce-link>
  </resource-ref>

but if I do it this way, how I create the context ?
Like this= :

Context ctx =3D new InitialContext(); //without parameters ?
Best Regards,
Olivier Voutat

O= n 3/31/06,=20 Manu George <manu.t.george@gmail.com> wrote:
Hi Olivier,
            &nb= sp;  You need not pass any properties to the InitialContext for local lookups from other components running in the server. You only need to give an ejb-ref in the deployment descriptor. You can get more info on this from Aaron's book

http://www.chariotsolutions.com/geronimo/geronimo-html-one-page.html<= /a>

There are also many examples in developerworks and confluence

Regards


On 3/30/06, Olivier Voutat < olivier.voutat@gmail.com> wrote:
To do the remote lookup for a bean I was set= ting my properties like this :

---------------------------------------------------------------------------= -------------------------------------------------------
prop.put("java.naming.factory.initial","org.openejb.client.R= emoteInitialContextFactory");
           
prop.put("java.naming.provider.url","localhost:4201");<= br>
prop.put("java.naming.security.principal","system");
prop.put("java.naming.security.credentials","manager");=
---------------------------------------------------------------------------= -------------------------------------------------------

I was researching and found that local calls should use:

---------------------------------------------------------------------------= -------------------------------------------------------
prop.put("java.naming.factory.initial","org.openejb.client.L= ocalInitialContextFactory");
---------------------------------------------------------------------------= -------------------------------------------------------
but the question is (and I'm asking because I didn't had enough time to keep testing) do I need the other properties lines ? Think not because it is a internal container lookup but would like to be sure.

Best Regards,
Olivier Voutat

--
Olivier & Cidiane Voutat
Rua Praia de Muri=FA, 9188
Cep 59= 092-390 / Natal - RN
Tel: (84) 3219-0427 Cel: (84) 9977-3917




--
Olivier &a= mp; Cidiane Voutat
Rua Praia de Muri=FA, 9188
Cep 59092-390 / Natal -= RN
Tel: (84) 3219-0427 Cel: (84) 9977-3917 ------=_Part_19163_5804850.1143799125985--