You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Mark R. Diggory" <md...@latte.harvard.edu> on 2003/12/12 18:19:55 UTC

Do I need a "Custom Resource Factory" for this?

I have a JNDI DirContext I use for accessing and LDAP server within my 
webapplication. I'd like to configure/instatiate it from my server.xml 
and store it in the provided InitialContext provided to the webapp (as 
opposed to allowing the webapp to configure it).

My question is: Do I need to write a "Custom Resource Factory" for this? 
Or is there a JNDIResourceFactory somewhere I can use?

thanks,
Mark

-- 
Mark Diggory
Software Developer
Harvard MIT Data Center
http://osprey.hmdc.harvard.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Do I need a "Custom Resource Factory" for this?

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
I wonder if this would work? Are ResourceParams actually the envronment 
configured in the JNDI ObjectFactory?

<Resource name="ldap/MyLDAPConnection" auth="Container" 
type="javax.naming.directory.DirContext"/>

<ResourceParams name="ldap/MyLDAPConnection">
     <parameter>
       <name>java.naming.factory.initial</name>
       <value>com.sun.jndi.ldap.LdapCtxFactory</value>
     </parameter>
     <parameter>
       <name>...</name>
       <value>...</value>
     </parameter>
</ResourceParams>

-M.

Mark R. Diggory wrote:

> I have a JNDI DirContext I use for accessing and LDAP server within my 
> webapplication. I'd like to configure/instatiate it from my server.xml 
> and store it in the provided InitialContext provided to the webapp (as 
> opposed to allowing the webapp to configure it).
> 
> My question is: Do I need to write a "Custom Resource Factory" for this? 
> Or is there a JNDIResourceFactory somewhere I can use?
> 
> thanks,
> Mark
> 

-- 
Mark Diggory
Software Developer
Harvard MIT Data Center
http://osprey.hmdc.harvard.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org