Howdy,
I've added this to the FAQ (Miscellaneous section).

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Shapira, Yoav
>Sent: Monday, December 22, 2003 9:00 AM
>To: Tomcat Users List
>Subject: RE: Accessing JNDI Context from outside Tomcat
>
>
>Howdy,
>There's no way, tomcat's JNDI is internal only.  It wouldn't hurt you
to
>search this list's archives, as this question has been answered many
>times in the past including at least once within the last two weeks.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-----Original Message-----
>>From: Swaminathan Gurumoorthy [mailto:[EMAIL PROTECTED]
>>Sent: Friday, December 19, 2003 6:48 PM
>>To: [EMAIL PROTECTED]
>>Subject: Accessing JNDI Context from outside Tomcat
>>
>>I am trying to do some standalone unit testing on my business logic
>layer
>>from outside Tomcat . I am hitting across a snag and I am relatively
>new to
>>JNDI.
>>
>>Within my application I do a
>>initCtx = new InitialContext();
>>
>> and Tomcat creates me a initial context for lookups. Now I did some
>>reverse engineering and found out the parameters that Tomcat uses to
>>configure the initial context.
>>
>>Based on that, I wrote standalone code to create a initial context:
>>
>>Hashtable env = new Hashtable();
>>
>>env.put(Context.INITIAL_CONTEXT_FACTORY,
>>"org.apache.naming.java.javaURLContextFactory");
>>
>>env.put(Context.URL_PKG_PREFIXES,"org.apache.naming");
>>
>>Context ctx = new InitialContext(env);
>>
>>
>>
>>If I run this I get
>>
>>javax.naming.NoInitialContextException: Cannot instantiate class:
>>org.apache.naming.java.javaURLContextFactory. Root exception is
>>java.lang.ClassNotFoundException:
>>org.apache.naming.java.javaURLContextFactory.
>>
>>Is there no way to access JNDI resources set up in Tomcat from
outside?
>Is
>>there a provider URL that I need to use? If yes, what is the value?
>>
>>TIA
>>
>>Swami
>>
>>
>>
>>---------------------------------
>>Do you Yahoo!?
>>New Yahoo! Photos - easier uploading and sharing
>
>
>
>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary and/or privileged.  This e-mail is intended only for the
>individual(s) to whom it is addressed, and may not be saved, copied,
>printed, disclosed or used by anyone else.  If you are not the(an)
intended
>recipient, please immediately delete this e-mail from your computer
system
>and notify the sender.  Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to