Using information from
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tnam_develop_naming.html
I tried the code below, both ways to get the Orb work, probably the second
one is better in an EJB.

Juergen



        protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException,
                IOException
        {
                NamingContextExt nc = null, ncn = null;
                ORB orb2 = null;
                
                try
                {
                        org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
                        org.omg.CORBA.Object obj = null;
                        
                        nc =
NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));
                        
                        
                        Context initialContext = new InitialContext(); 
                        orb2 = (ORB) initialContext.lookup("java:comp/ORB");

                }
                catch (Exception e)
                {
                        throw new ServletException(e);
                }
                
                PrintWriter writer = resp.getWriter();
                writer.write("doGet done. nc = " + nc + " orb2=" + orb2);

---

output:
doGet done. nc =
org.omg.CosNaming._NamingContextExtStub:[EMAIL PROTECTED]
[EMAIL PROTECTED]

-- 
View this message in context: 
http://www.nabble.com/Accessing-corba-from-geronimo-tp20095314s134p20112889.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

Reply via email to