You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Henri Yandell <fl...@gmail.com> on 2004/12/06 21:31:18 UTC

[naming] Next steps

Okay, I've woken up again Naming-wise :) Many thoughts, questions and
examples of how I don't understand JNDI/LDAP. This is all mostly to
Phil I assume.

* First off; what's the deal with the "java:" context. I've always
assumed that it's just for Java containers etc, and I can happily put
things in other contexts, but a remark from someone (Alex?) on the
list makes me think I may be clueless here.

* My aim is to switch simple-jndi to using naming-core as its
underlying jndi engine. The only real feature I'll lose is that the
simple-jndi database is live, so I'll probably add some kind of
file-polling later on (Commons-IO needs that anyway if it's not
already there).

* Build instructions on the site. We need to get better instructions
there on how to check out of svn (all of directory needs this improved
I think, took me a long time to find the svn url). I'd also suggest
that we switch to telling people to build core and factory
individually rather as a big multiproject build. All the factory
dependency crap (javamail/jta etc) gets in the way of a nice easy core
build.

* Audit of the class files we pulled over from Tomcat. Do we need all
of this? I admit I don't understand the half of it :)  The resources/
and Refs are my immediate area for not knowing what they're about.
Another question is whether JMX should be there, which basically means
the NamingService and NamingServiceMBean. The Refs look like they
might belong with the Factory part rather than Core. Or some of them
anyway.

That's all that hits me currently,

Hen

Re: [naming] Next steps

Posted by Henri Yandell <fl...@gmail.com>.
On Mon, 06 Dec 2004 23:44:46 -0500, Phil Steitz <ph...@steitz.com> wrote:
> Alex Karasulu wrote:
> > Henri Yandell wrote:
> >
> >
> >> * My aim is to switch simple-jndi to using naming-core as its
> >> underlying jndi engine. The only real feature I'll lose is that the
> >> simple-jndi database is live, so I'll probably add some kind of
> >> file-polling later on (Commons-IO needs that anyway if it's not
> >> already there).
> 
> What do you mean "the database is live" - you mean it is backed by a
> persistent store that can be modified?  Seems to me that this use case
> would be better served by Eve (see Alex's earlier post).  [naming] is
> essentially an in-memory JNDI provider that can be bootstrapped from
> config files (or other persistent store).  I don't understand the use
> cases for file polling. Why not use the JNDI APIs?  What kind of thing
> do you have in mind here?

I mean that each Context.lookup lead to a .properties file being read
(unless being accessed via the classpath in which case it would be
cached by the loader). :) It was a nice feature, but less important.

> >> * Build instructions on the site. We need to get better instructions
> >> there on how to check out of svn (all of directory needs this improved
> >> I think, took me a long time to find the svn url).
> 
> Agreed, though what we have here is not that bad:
> http://incubator.apache.org/directory/svn.html

Okay, awards for someone who can explain how I missed this that don't
paint me as a complete idiot :)

> I'd also suggest
> >> that we switch to telling people to build core and factory
> >> individually rather as a big multiproject build.
> 
> Agreed.
> >> All the factory
> >> dependency crap (javamail/jta etc) gets in the way of a nice easy core
> >> build.
> 
> Yes, for maven.  The ant build works fine from /core with just commons
> collections and mx4j as dependencies.  The extra dependencies in the

The maven build does too. Just that our instructions on the site are
multiproject based.

> maven build must be coming from the POM inheritance.  I have not tried
> this, but overriding the combined dependencies in the parent in
> project.xml for core might work.  In any case, I agree that this needs
> to be cleaned up.  May be best to can the multiproject approach.

I'd still keep it for the site, but basically go the way of Commons.
Build locally and do the site in one big go (though later on local
sites should be just as doable).

> A bigger issue is the large number of dependencies in /factory and the
> question of whether or not the two packages are correctly divided.  Any
> thoughts on how this can be improved would be appreciated.

Yeah, am pondering that already.

I noticed that in Tomcat, this code ships as 4 jars. resources,
factory, common and java.
Will ponder further as I dig more into the code again.

Hen

Re: [naming] Next steps

Posted by Alex Karasulu <ao...@bellsouth.net>.
Phil Steitz wrote:

> Alex Karasulu wrote:
>
>> Henri Yandell wrote:
>
<snip/>

>> That would be really nice.  If there were only a way to get 
>> notification back from the file system of changes.  You can do that 
>> on windows but not on other OSs it seems hence the lack of support in 
>> JDK.  But notification of change over polling is an awesome thing to 
>> have.
>
>
> What are the use cases?  Isn't it better to use the JNDI / LDAP APIs 
> to listen for / trigger changes?

Yeah that true! This is cake for the Eve LDAP JNDI provider since we can 
detect all alterations coming in through our interfaces (LDAP or JNDI).  
This is not the case for other namespaces/providers which store files 
that are more likely to be altered by a human editor.  Things like 
properties files that are accessed via JNDI for example can change 
because they get edited.  Then you want to detect this back door edit.  
Such a mechanism would help achieve this is I guess what we were thinking.

Alex



Re: [naming] Next steps

Posted by Phil Steitz <ph...@steitz.com>.
Alex Karasulu wrote:
> Henri Yandell wrote:
> 
>> Okay, I've woken up again Naming-wise :) Many thoughts, questions and
>> examples of how I don't understand JNDI/LDAP. This is all mostly to
>> Phil I assume.

Thanks!!
>>
>> * First off; what's the deal with the "java:" context. I've always
>> assumed that it's just for Java containers etc, and I can happily put
>> things in other contexts, but a remark from someone (Alex?) on the
>> list makes me think I may be clueless here.
>>
>>  
>>
> Yeah that's what I always thought: java:enc namespace is for J2EE 
> application configuration storage.

Yes, and resource references (jdbc connections, mail sessions, etc). 
The "java:comp/env" namespace is required by the J2EE spec, but the JNDI 
spec does not care about the content of names.

The "java:" means that a javaURLContextFactory will be used to create 
the context when an InitialContext instance is asked to lookup a name 
that starts with "java:".  This is the only scheme id supported by 
[naming] itself, but if you add (and configure, see 3.2.2 of the JNDI 
SPI spec for details) a fooURLContextFactory, you can handle names 
starting with the "foo:" scheme as well.  There is no need to use sheme 
ids at all.  I will modify the tests cases (and try to write some 
minimal docs) to make that clearer.
> 
>> * My aim is to switch simple-jndi to using naming-core as its
>> underlying jndi engine. The only real feature I'll lose is that the
>> simple-jndi database is live, so I'll probably add some kind of
>> file-polling later on (Commons-IO needs that anyway if it's not
>> already there).

What do you mean "the database is live" - you mean it is backed by a 
persistent store that can be modified?  Seems to me that this use case 
would be better served by Eve (see Alex's earlier post).  [naming] is 
essentially an in-memory JNDI provider that can be bootstrapped from 
config files (or other persistent store).  I don't understand the use 
cases for file polling. Why not use the JNDI APIs?  What kind of thing 
do you have in mind here?
>>  
>>
> That would be really nice.  If there were only a way to get notification 
> back from the file system of changes.  You can do that on windows but 
> not on other OSs it seems hence the lack of support in JDK.  But 
> notification of change over polling is an awesome thing to have.

What are the use cases?  Isn't it better to use the JNDI / LDAP APIs to 
listen for / trigger changes?
> 
>> * Build instructions on the site. We need to get better instructions
>> there on how to check out of svn (all of directory needs this improved
>> I think, took me a long time to find the svn url). 

Agreed, though what we have here is not that bad:
http://incubator.apache.org/directory/svn.html

I'd also suggest
>> that we switch to telling people to build core and factory
>> individually rather as a big multiproject build.

Agreed.
>> All the factory
>> dependency crap (javamail/jta etc) gets in the way of a nice easy core
>> build.

Yes, for maven.  The ant build works fine from /core with just commons 
collections and mx4j as dependencies.  The extra dependencies in the 
maven build must be coming from the POM inheritance.  I have not tried 
this, but overriding the combined dependencies in the parent in 
project.xml for core might work.  In any case, I agree that this needs 
to be cleaned up.  May be best to can the multiproject approach.

A bigger issue is the large number of dependencies in /factory and the 
question of whether or not the two packages are correctly divided.  Any 
thoughts on how this can be improved would be appreciated.

Phil
>>  
>>
> +1 +1 = +2 for each point above.
> 
> Alex


Re: [naming] Next steps

Posted by Alex Karasulu <ao...@bellsouth.net>.
Henri Yandell wrote:

>Okay, I've woken up again Naming-wise :) Many thoughts, questions and
>examples of how I don't understand JNDI/LDAP. This is all mostly to
>Phil I assume.
>
>* First off; what's the deal with the "java:" context. I've always
>assumed that it's just for Java containers etc, and I can happily put
>things in other contexts, but a remark from someone (Alex?) on the
>list makes me think I may be clueless here.
>
>  
>
Yeah that's what I always thought: java:enc namespace is for J2EE 
application configuration storage.

>* My aim is to switch simple-jndi to using naming-core as its
>underlying jndi engine. The only real feature I'll lose is that the
>simple-jndi database is live, so I'll probably add some kind of
>file-polling later on (Commons-IO needs that anyway if it's not
>already there).
>  
>
That would be really nice.  If there were only a way to get notification 
back from the file system of changes.  You can do that on windows but 
not on other OSs it seems hence the lack of support in JDK.  But 
notification of change over polling is an awesome thing to have.

>* Build instructions on the site. We need to get better instructions
>there on how to check out of svn (all of directory needs this improved
>I think, took me a long time to find the svn url). I'd also suggest
>that we switch to telling people to build core and factory
>individually rather as a big multiproject build. All the factory
>dependency crap (javamail/jta etc) gets in the way of a nice easy core
>build.
>  
>
+1 +1 = +2 for each point above.

Alex