Hi, There are numerous other open source JNDI projects with their own InitialContextFactory implementations, it's just that most don't allow what you're trying to do. For example, OpenJMS, JBoss, several components of the Enhydra server, and others.
BTW, don't use the System.setProperty approach. Instead pass the factory class name in the hashtable-version of the InitialContext constructor. That's much friendlier to other things running in the same JVM. Yoav Shapira Millennium Research Informatics -----Original Message----- From: Derek Greer [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 12:06 PM To: Tomcat Users List; Shapira, Yoav Subject: Re: JNDI binding a new resource So, is there not any other open source JNDI projects which have already written an InitialContextFactory class I can use? Ideally I would like to just replace my: System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.naming.java.javaURLContextFactory"); with System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.commons.jdni..InitialContextFactory"); or some such thing. Derek Greer Shapira, Yoav wrote: Hi, You have a couple of options within Tomcat: use a custom JNDI resource factory (this is covered in the JNDI how-to) which would allow you to control JNDI resource creation and stuff, but only for that factory and type, so it's limited. Alternatively, extend and/or customize the org.apache.naming classes that ship with Tomcat for your own needs. That's not trivial. Yoav Shapira Millennium Research Informatics -----Original Message----- From: Derek Greer [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 1:13 AM To: Tomcat Users List Subject: JNDI binding a new resource I'm looking for a way to bind to my InitialContext WITHOUT going through the Tomcat server.xml or context.xml files. From everything I've read so far, the InitialContext provided by Tomcat is read only, so I can't bind any new resources to it. How can I go about obtaining an InitialContext which I can write to? Again, I don't want to configure my resources within server.xml or context.xml. Derek --------------------------------------------------------------------- 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] 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.