Hi,
just curious:
jndi_props.put(javax.naming.Context.SECURITY_PRINCIPAL,"oops");
jndi_props.put(javax.naming.Context.SECURITY_CREDENTIALS,"oops");
jndi_props.put(javax.naming.Context.PROVIDER_URL,"ormi://196.129.237.124:23791/testapp");
i entered wrong appname - server hangs forever!!!!!
i entered wrong userid/passwd - no effect !?!?!?!?
additional line (dont know exactly what this mean):
jndi_props.put("dedicated.connection","true");
the wrong userid/passwd throws an exception _not_ in
"new InitialContext(jndi_props);" as excepted
but in "initial.lookup("ejb/Settings");" ?!?!?
...and nothing works :(
tia
klaus
Am Donnerstag, 20. September 2001 23:14 schrieben Sie:
> Hi Kesav,
>
> thanks for help, but it does not work (1.5.2 and 1.0.2.2.1)
>
> klaus
>
> Am Donnerstag, 20. September 2001 16:17 schrieben Sie:
> > This is what exactly I also observer long back.
> >
> > In your first senario every thing works fine
> >
> > If you want to access remote ejb from jsp/servlets there is a small
> > difference.
> >
> > 1)The lookup should not be java:comp/env/ the lookup should be
> > directly to the ejb name.
> > 2)You should not use PortableRemoteObject.narrow() after lookup.
> >
> >
> > Example.
> > If your ejb name is ejb/MyEJB
> >
> > Inside jsp/servlet
> > jndi_props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.ev
> >er mind.se rver.rmi.RMIInitialContextFactory");
> > ....
> > Context ctx = new InitialContext(jndi_props);
> > Home home = (Home)ctx.lookup("ejb/MyEJB"); //You get directly the
> > reference to the home object
> > Remote remote = homre.create();
> > remote.invoke();
> >
> >
> >
> > Kesav Kumar Kolla
> > Voquette Inc
> > 650 356 3740(W)
> > 510 889 6840(R)
> > Voquette....Delivering Sound Information
> >
> >
> > -----Original Message-----
> > From: Klaus Thiele [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 20, 2001 3:02 AM
> > To: Orion-Interest
> > Subject: Problems accessing remote EJBs
> >
> >
> > Hi all,
> > (it drives me crazy...)
> >
> > i'm trying to access some ejbs from my webapp on another
> > orion-server.
> >
> > 1) my application-client (with application-client.xml) works fine.
> >
> > jndi_props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.ev
> >er mind.se rver.ApplicationClientInitialContextFactory");
> > ...
> > initial = new InitialContext(jndi_props); => Ok.
> > rootctx = (Context)initial.lookup("java:comp/env");
> > System.out.println("rootctx: "+rootctx.toString()); ==>
> > shows the contents of application-client.xml (=Context), Ok.
> >
> > 2) same source but (servlet or jsp-page(attached))
> >
> > jndi_props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.ev
> >er mind.se rver.rmi.RMIInitialContextFactory");
> > ...
> > initial = new InitialContext(jndi_props); => Ok.
> > rootctx = (Context)initial.lookup("java:comp/env");
> > System.out.println("rootctx: "+rootctx.toString());
> > ==> Exception: "java:comp/env
> > not found"
> >
> > Did i miss something????? - where to get the Context? - whats
> > wrong?
> >
> > 3) same as 2) but calling
> > initial = new InitialContext(); => local access
> > rootctx = (Context)initial.lookup("java:comp/env");
> > System.out.println("rootctx: "+rootctx.toString()); ==>
> > shows webapp.war/web.xml (=Context), Ok.
> >
> > tia
> > klaus
> >
> > btw:
> > rmi.xml: <server host="196.129.237.124" port="23791"
> > username="admin" password="secure"/>
> > orion-application.xml: <ejb-module remote="true"
> > path="ejb-jar.jar" /> works (for all ejbs) if _both_ servers are
> > 1.5.2 or
> > oc4j-1.0.2.2.1. but then there are other bugs....
> >
> > --
> > Klaus Thiele - Personal & Informatik AG
> > mailto:[EMAIL PROTECTED]
> >
> > "Your mouse has moved.
> > Windows must be restarted for the change to take effect."
>
> ----------------------------------------
> Content-Type: text/html; charset="iso-8859-1"; name="Anhang: 1"
> Content-Transfer-Encoding: quoted-printable
> Content-Description:
> ----------------------------------------
--
Klaus Thiele - Personal & Informatik AG
mailto:[EMAIL PROTECTED]
"Your mouse has moved.
Windows must be restarted for the change to take effect."