Quoting Arthur T Smyles <[EMAIL PROTECTED]>:
> 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.A
ppFactory");
>
> 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?
Using this doesn't work right now, but perhaps it could be fixed.
I fail to see how it could be useful anyway, since whatever happens :
- the reference format is server specific (the attributes name in the reference
is not something which is portable from one server to another)
- the reference definition format (for exemple how to specify the JDBC driver,
etc) is server specific
So having the object factory definition server specific too doesn't look like
it's a big problem to me.
All the other open source JNDI implementation I've checked (Tyrex, jBoss,
OpenJMS) :
- specify the object factory when they bind the reference
- don't allow plugging external object factories
- have custom reference attribute names
So the Catalina naming package is more flexible overall (although like the
others, it's proprietary).
Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]