[Venu Gopal] -----Original Message-----Hi Mark,
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Ronald Wildenberg
Sent: Tuesday, February 05, 2002 7:37 AM
To: [EMAIL PROTECTED]
Subject: Re: JRun/JNDI QuestionNot sure if this helps, but I do not think you need the Properties
map. I suppose that you are deploying your servlets and your beans
in the same application server. The properties should be known
already then.If you are running a client application outside the application server
you should provide for these properties.Ronald Wildenberg
"Galbreath, Mark" wrote:
JRun's documentation sucks and it's code examples use deprecated methods. Does anybody know the correct means to get a JNDI reference to an EJB home interface from a servlet? I've tried most everything, but what I got before pulling the rest of my hair out and quitting is a servlet containing, in part:
Context jndiContext = getInitialContext();
Object ref = jndiContext.lookup( "java:comp/env/ejb/CustomerHome");
* * *
public static Context getInitialContext() throws NamingException {
Properties p = new Properties();
p.setProperty( Context.PROVIDER_URL, "ejipt://192.168.0.1:8100");
p.setProperty( Context.INITIAL_CONTEXT_FACTORY, "allair.ejipt.ContextFactory");
return new InitialContext( p);
}The PROVIDER_URL is the port for my JRun Server. The INITIAL_CONTEXT_FACTORY is what the documentation says is correct, although there is an InitialContextFactory class in another package. And the JNDI lookup is in the recommended form. I've also tried the put() method of Property. No matter what, ref is always null.
A couple of interesting things:
(1) I am not getting a NullPointerException (nor any other error) when calling the servlet from a browser - just a page with some test HTML output from a PrintWriter() statement prior to the JNDI lookup;
(2) assert always throws a NullPointerException:
assert ref == null;
assert ref != null;
assert ref.equals( null);I know this is happening because the Rams lost the SB...Appreciate any insight(s) you guys may have.
Mark
Hello
Friends,
I want
to dispaly directory structure on the browser, generated by servlet, and its in
the leftside of the panel (frame), mean html frames,
if u
suggest any techqunies.. its appriciate a lot,
thanxs
in advance,
cheers
venu
- JRun/JNDI Question Galbreath, Mark
- Re: JRun/JNDI Question ^BoyInterrupted^
- Re: JRun/JNDI Question Ronald Wildenberg
- Re: JRun/JNDI Question Venu Gopal
- Re: JRun/JNDI Question Tom�s( Marek
- Re: JRun/JNDI Question Harish K Kottarathil
- Re: JRun/JNDI Question Colin Capriati
- Re: JRun/JNDI Question Galbreath, Mark
- Re: JRun/JNDI Question Gayathri Palicherla
- folder display on web Venu Gopal
- Re: folder display on web Soubhratra Das
- Re: JRun/JNDI Question Albert Pi
