tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Greer <dgr...@fedex.com>
Subject Re: JNDI binding a new resource
Date Fri, 01 Oct 2004 21:12:08 GMT
BTW Yoav, I wanted to thank you for the information you provided.  This 
helped to steer me down the right road to discovering a solution.

I also wanted to share my findings for the benefit of others who may run 
across this need.  I was able to get my Tomcat instance working with my 
code by using Jakarta's directory-naming, however I subsequently 
discovered that all I had to do to overcome the Read only issue of 
Tomcat's JDNI instance was to change the name of my initial context from 
java:comp to [my project name]:comp.  I am therefore just using the 
standard JDNI javaURLContextFactory that is provided with Tomcat.  For 
anyone interested in the specifics, feel free to shoot me an email.

Derek Greer

Shapira, Yoav wrote:

>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:dgreer@fedex.com] 
>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:dgreer@fedex.com]
>	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:
>tomcat-user-unsubscribe@jakarta.apache.org
>	For additional commands, e-mail:
>tomcat-user-help@jakarta.apache.org
>	    
>
> 
> 
> 
> 
>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: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
>  
>
>
>
>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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message