> 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 :
<ResourceParams name="jdbc/MyDataSource">
<parameter><name>factory</name><value>classname.of.the.object.factory</value
></parameter>
<!-- Then add whatever other parameters your factory will
need -->
<parameter><name>user</name><value>sa</value></parameter>
<parameter><name>password</name><value></value></parameter>
<parameter><name>driverClassName</name>
<value>org.hsql.jdbcDriver</value></parameter>
<parameter><name>driverName</name>
<value>jdbc:HypersonicSQL:database</value></parameter>
</ResourceParams>
Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]