Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 65684 invoked from network); 30 Jan 2001 22:31:31 -0000 Received: from threshold3.jpmorgan.com (HELO jpmorgan.com) (169.71.1.12) by h31.sny.collab.net with SMTP; 30 Jan 2001 22:31:31 -0000 Received: (from uucp@localhost) by jpmorgan.com (8.8.5/8.8.5) id RAA03008 for ; Tue, 30 Jan 2001 17:31:36 -0500 (EST) Received: from jpmmailhost4.ny.jpmorgan.com(198.75.231.102) by threshold3.jpmorgan.com via smap (V4.2) id xma003003; Tue, 30 Jan 01 17:31:35 -0500 Received: from nyc-ntgw-n01.ny.jpmorgan.com (nyc_smtpmta_02.ny.jpmorgan.com [146.149.150.22]) by jpmmailhost4.ny.jpmorgan.com (8.9.1a/8.9.1) with SMTP id RAA08969 for ; Tue, 30 Jan 2001 17:31:35 -0500 (EST) Received: by nyc-ntgw-n01.ny.jpmorgan.com(Lotus SMTP MTA v4.6.4 (830.2 3-23-1999)) id 852569E4.007BB83D ; Tue, 30 Jan 2001 17:31:20 -0500 X-Lotus-FromDomain: JPMORGAN@SMTP From: "Arthur T Smyles" To: tomcat-dev@jakarta.apache.org Message-ID: <852569E4.007BB74E.00@nyc-ntgw-n01.ny.jpmorgan.com> Date: Tue, 30 Jan 2001 17:31:21 -0500 Subject: Re: Custom ObjectFactory w\ Tomcat 4.0beta1 Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Thanks for you quick response. It has though brought about more questions. For example, if I had the following code Hashtable env=new Hashtable(); env.put("java.naming.factory.initial","com.sun.jndi.ldap.LdapCtxFactory"); env.put("java.naming.factory.object","crmg.tailgun.jndi.UserFactory:crmg.sysadmin.jndi.AppFactory"); env.put("java.naming.factory.state","crmg.tailgun.jndi.UserFactory:crmg.sysadmin.jndi.AppFactory"); etc... DirContext root=new InitialDirContext(env); According to the JNDI spec the object and state factories from this environment should be added to the application resource properties and the system properties for this context. It should have no effect on any other contexts from any other applications. By not following this convention, it forces me to do things in a Tomcat specific way.What are the issues that prevent Tomcat from following this convention? Also, I took a look at org.apache.naming packages but I am unsure which classes are affecting this? Arthur remm@apache.org on 01/30/2001 04:36:33 PM Please respond to tomcat-dev@jakarta.apache.org To: tomcat-dev@jakarta.apache.org cc: (bcc: Arthur T Smyles) Subject: Re: Custom ObjectFactory w\ Tomcat 4.0beta1 > I developed an JNDI ObjectFactory that is used to read User Objects from LDAP. > When I run a test program and perform a lookup it works fine. But when I use it > within Tomcat 4.0 it ignores the java.naming.factory.object and > java.naming.factory.state attributes that I am setting when creating the > InitialContext. Does anyone have any ideas why these attributes are getting > ignored? Any help would be appreciated. First of all, the object factories are not pluggable in b1 without modifying some code in the naming.factory package (although the modifications are quite simple). That has been added since then, and b2 will have pluggable factories. However, it will not use the standard mechanism for a variety of reasons (static mechanism - that's bad if like here you're supposed to have isolated independant contexts -, not flexible enough, classloading issues, ...). Instead, the reference is always processed through a set of proxy object factories. In b2, you can use the "factory" parameter to specify a custom store. This is done in server.xml like this : factoryclassname.of.the.object.factory usersa password driverClassName org.hsql.jdbcDriver driverName jdbc:HypersonicSQL:database Remy --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, email: tomcat-dev-help@jakarta.apache.org This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of J.P. Morgan Chase & Co. Incorporated, its subsidiaries and affiliates.