Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 49400 invoked from network); 23 Sep 2005 02:40:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Sep 2005 02:40:12 -0000 Received: (qmail 11900 invoked by uid 500); 23 Sep 2005 02:40:10 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 11885 invoked by uid 500); 23 Sep 2005 02:40:10 -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 11872 invoked by uid 99); 23 Sep 2005 02:40:10 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2005 19:40:10 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.207.214] (HELO web32504.mail.mud.yahoo.com) (68.142.207.214) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 22 Sep 2005 19:40:18 -0700 Received: (qmail 85090 invoked by uid 60001); 23 Sep 2005 02:39:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=MfODmOa5FNa1QY9+1FxOR4KYcl+iw1dM5yZwpDljl2DlcBTXgYb9PATeegpYvD+q8/KyidVXTxUdfXHHc/lnkqAK5mhJVuDCnILeZLg35wjmRvBd69MQx/vAHAslls5BMHbDPqai3srAnAGwulqAwP8wig1eq9Rhm/RFRlD+qh8= ; Message-ID: <20050923023948.85088.qmail@web32504.mail.mud.yahoo.com> Received: from [24.211.224.240] by web32504.mail.mud.yahoo.com via HTTP; Thu, 22 Sep 2005 19:39:48 PDT Date: Thu, 22 Sep 2005 19:39:48 -0700 (PDT) From: lin sun Subject: Re: org.omg.CosNaming.NamingCntextPackage.NotFound To: user@geronimo.apache.org In-Reply-To: <48e317ecae25379b216613a0740f9a78@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks again for the quick response and it is very helpful! Hope I can get it working any day soon!:-) So I decided to redesign my test scenario based on your recommendations: 1) Find a J2EE client and EJB sample that would work in geronimo environment. Luckily, I was able to get the MagicGball ear file deployed and the MagicGball-client running in the J2EE client container. I'd like to use this sample and modify it so that the J2EE client can communicate to EJBs via IIOP. 2) Customize the EJBs and make them available through Corba 3) Customize the client so that it can use the EJB through Corba I followed your guildance below on No. 2 and No. 3 but I could not get much further. Could you please help? > To make ejbs available through Corba (as servers), you need to: > 1. include a tss-link for each ejb in the openejb-plan to a tss bean > that is configured somewhere, such as the j2ee-server-corba-plan.xml > 2. start the j2ee-server-corba-plan. The easiest way to do this is to > include and "include" element in your openejb plan: > > > org/apache/geronimo/ServerCORBA > I created the openejb-jar.xml file myself, since MagicGball didn't have one. I could not find much example on ...so I assume I can put a tss bean name like "SSLClientCert" that is specified in the j2ee-server-corba-plan.xml. Not sure if this is correct, all I know is that the deployer didn't complain:-) I put the .. before the but when I tried to deploy the ear file, the deployer complained that it expected a tag instead. Can I just set the parentID to "org/apache/geronimo/ServerCORBA" to reach the same goal? org/apache/geronimo/ServerCORBA MagicGBall SSLClientCert > To use an ejb from a j2ee application (such as a j2ee app client, web > app, or ejb) you need to include in the geronimo/openejb plan ejb-ref > information like this: I read Aaron's book on J2EE client application, and I didn't see anywhere mentions openejb-jar.xml, so I assume you mean geronimo-client.xml here? > 1. where the naming server is and the name > 2. a css-link to supply the security info for csiv2 negotiation with > the server. A typical element might look like this: > > > ejb/Control > corbaloc::: service port>/NameService > targetEjbName > SSLClientCert > > (fill in the correct values for the host and port) I tried to modify the geronimo application client xml file provided by MagicGball as follows, but the deployer complained the ns-corbaloc, name, css-link elements were not allowed when I deployed the ear file. Magic G Ball mGball Session org.acme.MagicGBallHome org.acme.MagicGBall magicGball-ejb.jar#MagicGBall corbaloc::localhost:1050/NameService MagicGBall SSLClientCert Deployer error: E:\geronimo-1.0-SNAPSHOT\geronimo-1.0-SNAPSHOT>java -jar bin\deployer.jar --user system --password manager deploy \build\geronimo\applications\magicGball\target \magicGball.ear Error: Unable to distribute magicGball.ear: Unable to parse application-client.xml caused by Invalid deployment descriptor: [error: cvc-complex-type.2.4b: Element not allowed: ns-corbaloc@http://java.sun.com/xml/ns/j2ee in element ejb-ref@http://java.sun.com/xml/ns/j2ee, error: cvc-complex-type.2.4b: Element not allowed: name@http://java.sun.com/xml/ns/j2ee in element ejb-ref@http://java.sun.com/xml/ns/j2ee, error: cvc-complex-type.2.4b: Element not allowed: css-link@http://java.sun.com/xml/ns/j2ee in element ejb-ref@http://java.sun.com/xml/ns/j2ee] > If your j2ee component is running in a server (it is a web app or ejb), > you should include the ServerCORBA configuration as a parent, just like > for a server ejb. If your j2ee component is an app client, which runs > in a different jvm, you should include the ClientCORBA configuration. > Unfortunately the clientCORBA configuration is still incomplete: you > need some security gbeans. I think I need to change the ask(String question) method in MagicGBallClient.java use Corba. I am a bit lost here on what parm would ic.lookup() take? Since I could have define them via the ns-corbaloc tag. //linsun: look up MagicGBallHome in the naming context InitialContext ic = new InitialContext(); Object mgbObj = ic.lookup("corbaname::localhost:1050/NameService"); //linsun: perform a safe downcast MagicGBallHome home = (MagicGBallHome)PortableRemoteObject.narrow(mgbObj,MagicGBallHome.class); //from the original sample MagicGBall mGball = home.create(); String answer = mGball.ask(question); > Finally, to use a ejb from a non-j2ee application through CORBA you > need to set up most of the infrastructure that the gbeans set up for > you: at least the Orb, the dynamic stub classloader, and some CSS > implementation. This last part is something no one has tried yet as > far as I know. > > On the other hand, if you can find someone elses example of a > standalone non-j2ee client that accesses ejbs using csiv2 security over > CORBA you should be able to communicate with those ejbs deployed in > geronimo. However, I've never seen such an example. Gave up this approach--don't want to run into too much surprises!:-) thanks, Lin __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com