Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 87708 invoked from network); 20 May 2008 14:12:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 May 2008 14:12:16 -0000 Received: (qmail 26473 invoked by uid 500); 20 May 2008 14:12:15 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 26445 invoked by uid 500); 20 May 2008 14:12:15 -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 26434 invoked by uid 99); 20 May 2008 14:12:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 07:12:15 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of trygve.hardersen@gmail.com designates 64.233.170.185 as permitted sender) Received: from [64.233.170.185] (HELO rn-out-0910.google.com) (64.233.170.185) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 14:11:26 +0000 Received: by rn-out-0910.google.com with SMTP id j40so648292rnf.4 for ; Tue, 20 May 2008 07:11:41 -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:references; bh=0+Gl3fCepkmdY0PBPy+cdtqjpd4cuKrjqdqExqYkxH4=; b=CCfqfOKXCaNQmQcfLSQlUuVrYw8MgSR4LeOY/qoeFsTx8hbcfSq3Xutfjxv2XENoKHNtGTCD5Pxj5sIpD9opfSq3OsZIQcfHw+wexapns12qocjVY9VV7f4a8RdznWVTTHe0d6EvDnTQ/omfz2PaUmu8X9jAdd9wPzgJLMiDKks= 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:references; b=A8TjwJEPq5Y1Qrd0FC8zC9vwzy0nHKOHeuB+sFZN6TKvyZ9LyJq9SyCjrBoaiBheVixAWpZJawx0RiI3g3h0IcrCbxS0Ni4Hxnay9seAWu5PrIUrEL929Lz99cwZDaZGfTegx25yE6bpfR613VfDDYBc4FymCUGjITAA9oh/4eo= Received: by 10.142.239.13 with SMTP id m13mr3352372wfh.218.1211292700349; Tue, 20 May 2008 07:11:40 -0700 (PDT) Received: by 10.142.125.11 with HTTP; Tue, 20 May 2008 07:11:40 -0700 (PDT) Message-ID: <3e9ed2c20805200711m7ac3c968v567a21edceb371ef@mail.gmail.com> Date: Tue, 20 May 2008 16:11:40 +0200 From: "Trygve Hardersen" To: user@geronimo.apache.org Subject: Re: JNDI-Lookup with Global-JNDI-Name from stand-alone JAVA-Client doesn't work any more in 2.1.1 In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1528_17670259.1211292700344" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_1528_17670259.1211292700344 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello I had a similar problem which was caused by the client still using the 3.0-beta2 (I think) instead of the 3.0 version of OpenEJB. I could create the InitialContext but the lookup just hung forever with no error whatsoever. Upgrading OpenEJB on the client side solved the problem. Trygve 2008/5/20 : > > Hi all, > > I just wanted to do some JUNIT-Testing with EJB3 and Remote-Beans. The te= st > works on 2.0.2, but not with 2.1.1 any more. Here the code: > > JUNIT-4 Testclass: > @Test > public void testAnlegenPasswortregel() throws NamingException { > Subject user =3D null; > > Properties p =3D new Properties(); > p.setProperty(Context.INITIAL_CONTEXT_FACTORY, > "org.openejb.client.RemoteInitialContextFactory"); > p.setProperty(Context.PROVIDER_URL, > "ejbd://localhost:4201"); > > // Minimum required for login > p.setProperty(Context.SECURITY_PRINCIPAL, "system"); > p.setProperty(Context.SECURITY_CREDENTIALS, "manager"); > > // Optional param for specifying a specific Geronimo > security realm > p.put("openejb.authentication.realmName", > "vesuv-db-sha256"); > > InitialContext ctx =3D new InitialContext(p); > > > LoginManager loginManager =3D null; > try { > loginManager =3D (LoginManager) > ctx.lookup("LoginManagerImplRemote"); > } catch (NamingException e1) { > // TODO Auto-generated catch block > e1.printStackTrace(); > } > ..... > > EJB-3 Bean: > @Stateless(mappedName=3D"LoginManagerImplRemote") > @Remote(LoginManager.class) > public class LoginManagerImpl implements LoginManager { > > > With Geronimo 2.0.2 the lookup succeeds. > With Geronimo 2.1.1 the client-process doesn't ever terminate. I get no > NamingException, nothing at all. > > Any help on this topic would be wonderful > > cu Josef Eisele > ------------------------------ > BGS Beratungsgesellschaft > Software Systemplanung AG *Niederlassung Rhein/Main* > Robert-Koch-Stra=DFe 41 > 55129 Mainz > Fon: +49 (0) 6131 / 914-0 > Fax: +49 (0) 6131 / 914-400 > www.bgs-ag.de *Gesch=E4ftssitz Mainz* > *Registergericht* > Amtsgericht Mainz > HRB 62 50 > *Aufsichtsratsvorsitzender* > Dr. Wolfgang Trommer > *Vorstand* > Hanspeter Gau > Hermann Kiefer > Nils Manegold > Heinz-J=F6rg Zimmermann [image: BGS Systemplanung AG] > > [image: Ein Unternehmen der nextevolution consulting group] ------=_Part_1528_17670259.1211292700344 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello

I had a similar problem which was caused by the client still u= sing the 3.0-beta2 (I think) instead of the 3.0 version of OpenEJB. I could= create the InitialContext but the lookup just hung forever with no error w= hatsoever. Upgrading OpenEJB on the client side solved the problem.

Trygve

2008/5/20 <Josef.Eisele@bgs-ag.de>:

Hi all,

I just wanted to do some JUNIT-Testing with EJB3 and Remote-Beans. The test works on 2.0.2, but not with 2.1.1 any more. Here the code:

JUNIT-4 Testclass:
  &= nbsp;     @Test
&n= bsp;       public void testAnlegenPasswortregel() throws NamingException {
                Subject user =3D null;
               
 =               Properties p =3D new Properties();
                p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.openejb.client.RemoteInitialContextFactory");
                p.setProperty(Context.PROVIDER_URL, "ejbd://local= host:4201");

 =               // Minimum required for login
                p.setProperty(Context.SECURITY_PRINCIPAL, "system");
  =               p.setProperty(Context.SECURITY_CREDENTIALS, "manager");

&n= bsp;               // Optional param for specifying a specific Geronimo security realm
&nbs= p;               p.put("openejb.authentication.realmName", "vesuv-db-sha256");

                InitialContext ctx =3D new InitialContext(p);               
 =      
 = ;               LoginManager loginManager =3D null;
                try {
&= nbsp;                       loginManager =3D (LoginManager) ctx.lookup("LoginManagerImplRemote");                } catch (NamingException e1) {
                        // TODO Auto-generated catch block
&= nbsp;                       e1.printStackTrace();

        &nbs= p;       }
 = ;                               .....=

EJB-3 Bean:
<= font face=3D"sans-serif" size=3D"2">        @Stateless(= mappedName=3D"LoginManagerImplRemote")

        @Remote(LoginManager.class= )
        public class LoginManagerImpl implements LoginManager {


With Geronimo 2.0.2 the lookup succeeds.
With Geronimo 2.1.1 the cli= ent-process doesn't ever terminate. I get no NamingException, nothing at all.

Any help on this topic would = be wonderful

cu Josef Eisele<= br>

BGS Beratungsgesellscha= ft
Software Systemplanung AG
     
  Niederlassung Rhein/Main=
Robert-Koch-Stra=DFe 41
55129 Mainz
Fon: +49 (0) 6131 / 914-0=
Fax: +49 (0) 6131 / 914-400
www.bgs-ag.de
Gesch=E4ftssitz Mainz
Registergericht
Amtsgericht Mainz
HRB 62 50
 
Aufsichtsratsvorsitzende= r
Dr. Wolfgang Trommer
Vorstand
Hanspeter Gau
Herman= n Kiefer
Nils Manegold
Heinz-J=F6rg Zimmermann
3D"BGS

&nbs= p;3D"Ein=

------=_Part_1528_17670259.1211292700344--