directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <>
Subject [apacheds] A final summary for the changes in 'db_refactor' branch before merging it back.
Date Wed, 22 Jun 2005 14:41:51 GMT
[apacheds] A final summary for the changes in 'db_refactor' branch before 
merging it back.

Hi folks,

Here's a summary of the changes in 'db_refactor' branch. Please follow this 
message browsing your working in your IDE. That will help you much more to 
understand this.

The changes in context partitions
* Moved all classes related with context partitions to 
* BackingStore is removed and merged into ContextPartition. I found no 
reason to keep BackingStore. Merging it into ContextPartition also was OK.
* PartitionNexus is renamed to ContextPartitionNexus, and became an abstract 
class to provide some static methods moved from SystemPartition.
* RootNexus is renamed to DefaultContextPartitionNexus
* ContextPartitions now have better two lifecycle methods: init( 
ContextFactoryConfiguration, ContextPartitionConfiguration ) and destroy().
* ContextFactoryConfiguration doesn't set up or tear down partitions now. 
DefaultContextPartitionNexus.init() and destroy() does. 
ContextFactoryConfiguration now simply calls 
DefaultContextPartitionNexus.init() to start up all application partitions.
* SystemPartition is removed thanks to introduction of JdbmContextPartition. 
Because SystemPartition doesn't need to instantiate JdbmDatabase anymore, it 
became to have only static methods and constants. I moved those static 
members to ContextPartitionNexus which is now an abstract class.

The changes in 'db' package
* Database interface is removed.
* BTree-specific classes are moved to 
* org.apache.server.db.gui is renamed to 
* JDBM implementation package is renamed to 
* JdbmDatabase is renamed to JdbmContextPartition, which is a 
ContextPartition, not Database anymore.
* JdbmDatabase extends BTreeContextPartition which implements 
ContextPartition and merges AbstractDatabase.
* Some classes independent from BTree implementations 
(ResultFilteringEnumeration, SearchResultFilter, SearchResultEnumeration) 
are moved to org.apache.ldap.server.enumeration.

The changes in 'interceptor' package
* Interceptor.init() and destroy() method is more useful now.
* InterceptorContext is deprecated by ContextFactoryConfiguration and 
InterceptorConfiguration, and removed.
* Invocation object is not used anymore; Interceptor provides all 
interception methods that matches to ContextPartitionNexus method by method. 
BaseInterceptor also has changed to follow this change.

The changes in 'invocation' package
* Because Interceptor doesn't use Invocation class anymore, its duty has 
changed to representation of 'the invocation from JNDI context to 
ContextPartition'. Invocation is pushed to InvocationStack when an 
invocation from JNDI context (ServerDirContext) occurs, and popped from 
InvocationStack when the invocation ends.
* Added InvocationStack to represent recursive calls to 
ContextPartitionNexus. Actually it has been done by an AspectJ class in 
ApacheDS in conjunction with Invocation. Now, Invocation doesn't manage 
context stacks anymore. Instead, target JNDI context property is added to 
Invocation to represent which JNDI context the invocation came from, and 
Invocation (instead of Context) is pushed to and popped from 
InvocationStack. InvocationStack is managed by its internal instance map 
whose key is 'current thread'. I didn't use ThreadLocals to manage resources 
more explicitly, so the content of InvocationStack is explicitly pushed and 
popped by ContextPartitionNexusProxy.
* The change above helped me to removed dependency to AspectJ, and it means 
that ApacheDS now compiles OK in Java 5.

The changes in 'authn' package
* Authenticator.init() and destroy() method is more useful now.
* AuthenticatorContext is deprecated by ContextFactoryConfiguration and 
AuthenticatorConfiguration, and removed.

What didn't change
* All tests still pass.
* Most part of ContextPartition is retained.
* You can configure ApacheDS as before.

* Rewrite JavaDocs
* Improve more by others' feedback.
* Transaction API (perhaps we have to merge now and branch again for it)
what we call human nature is actually human habit

View raw message