You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Trustin Lee <tr...@gmail.com> on 2005/03/20 17:26:06 UTC

[apacheds] New interceptor interface.

Hi,

I branched apacheds trunk and revamped interceptor architecture.  I
hope you like it.

* Replaced Invocation with Call and its subclasses which are more
object-oriented
* Interceptor became much more like Servlet filters which is more user friendly.
* JndiProvider doesn't manage interceptor chains. (new InterceptorChain does)
* JndiProvider doesn't control the flow of interceptors anymore. 
Interceptors themselves do via invocation chaining exactly like
Servlet filters.

For now, almost all test cases pass.  Failing tests are due to the bug
shutdown is not properly performed, and therefore I can say that all
tests pass. :)

WDYT about new Interceptor?

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [apacheds] New interceptor interface.

Posted by Alex Karasulu <ao...@bellsouth.net>.
Trustin Lee wrote:

>Hi Alex,
>  
>
<snip/>

>>I removed @author tags with our names.  Let's avoid doing this and just
>>using
>>@author <a href="mailto:dev@directory.apache.org">Apache Directory
>>Project</a>.
>>    
>>
>
>OK I'll do so from now on.  I remember the discussion a few weeks ago
>about author names, and I thought it is OK to write the name of
>author.  Sorry for misunderstanding!
>  
>
No you're right I think someone said that its ok for others to do that.  
But we should make it the rule for consistency.  I would like to have it 
be enforced by our PMC.  If we have to we can vote on it but this is not 
necessary.

So let's just set forth the rule:

    No @author tags period except for the one to the directory dev list.

<snip/>

>It is due to shutdown issue.  Actually interceptor chain didn't cause
>it at all.  It is because I checked in some fixes about exception
>handling in the branch. :)  If we resolve that issue, it'll pass.
>  
>
Ok I'm looking into it.

Alex


Re: [apacheds] New interceptor interface.

Posted by Trustin Lee <tr...@gmail.com>.
Hi Alex,

> This ROCKS!!!!!!!!!!!!
> 
> I love it - absolutely love it.  You really cleaned it up in there and
> reduced the amount of code.  Thanks a lot.  This is a very elegant
> application of patterns as well.  I learned from looking at your code.

Thanks. :)

<snip/> 

> Now there were a few minor things.
> 
> I removed @author tags with our names.  Let's avoid doing this and just
> using
> @author <a href="mailto:dev@directory.apache.org">Apache Directory
> Project</a>.

OK I'll do so from now on.  I remember the discussion a few weeks ago
about author names, and I thought it is OK to write the name of
author.  Sorry for misunderstanding!

> Some methods, members and classes do not have jdoco.

Yes, I added just minimal JavaDocs to let users can implement
interceptor interface.   Let's add more flesh...

> Also some tests are failing ...
> 
>    [junit] [ERROR] TEST org.apache.ldap.server.jndi.ShutdownTest FAILED
>    [junit] [ERROR] TEST org.apache.ldap.server.jndi.RootDSETest FAILED
>    [junit] [ERROR] TEST
> org.apache.ldap.server.jndi.SimpleAuthenticationTest FAILED
> 
> Let's get these out of the way before we merge back into the trunk.

It is due to shutdown issue.  Actually interceptor chain didn't cause
it at all.  It is because I checked in some fixes about exception
handling in the branch. :)  If we resolve that issue, it'll pass.

Cheers,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [apacheds] New interceptor interface.

Posted by Alex Karasulu <ao...@bellsouth.net>.
Trustin Lee wrote:

>Hi Alex,
>  
>
>>I prefer Invocation - for some reason Call sounds strange.  Don't know
>>why yet - guess I'm used to having an invocation bean.  Can you put some
>>stuff together into a wiki or xdocs for this so I can see docos?  Like
>>workflow for people customizing an interceptor chain.
>>    
>>
>
>I renamed to invocation, and added detailed JavaDocs for invocation
>and invocation.interceptor packages.  I bet you'll like it. :)
>  
>
This ROCKS!!!!!!!!!!!!

I love it - absolutely love it.  You really cleaned it up in there and 
reduced the amount of code.  Thanks a lot.  This is a very elegant 
application of patterns as well.  I learned from looking at your code.

I really like the fact that you differentiated the Invocation object for 
each type Add, Delete, ... etc.  Also the fact that the NextInterceptor 
is really a proxy managed by the InterceptorChain is a great application 
of mini-IoC and it avoids serious nastiness in having interceptor 
dependencies to chain them. 

>>Cool I was meaning to do that at some point thanks.  BTW there's one
>>chain for everything. ... can you explain in docos the changes in
>>semantics now?
>>    
>>
>
>I didn't compare the current interceptor architecture with the
>previous one unfortunately.  
>
No need to waste your time on the old nastiness - its not worth it. 

<snip/>

Now there were a few minor things. 

I removed @author tags with our names.  Let's avoid doing this and just 
using
@author <a href="mailto:dev@directory.apache.org">Apache Directory 
Project</a>.

Some methods, members and classes do not have jdoco. 

Also some tests are failing ...

    [junit] [ERROR] TEST org.apache.ldap.server.jndi.ShutdownTest FAILED
    [junit] [ERROR] TEST org.apache.ldap.server.jndi.RootDSETest FAILED
    [junit] [ERROR] TEST 
org.apache.ldap.server.jndi.SimpleAuthenticationTest FAILED

Let's get these out of the way before we merge back into the trunk. 

Great work,
Alex


Re: [apacheds] New interceptor interface.

Posted by Trustin Lee <tr...@gmail.com>.
Hi Alex,

<snip/>

> I prefer Invocation - for some reason Call sounds strange.  Don't know
> why yet - guess I'm used to having an invocation bean.  Can you put some
> stuff together into a wiki or xdocs for this so I can see docos?  Like
> workflow for people customizing an interceptor chain.

I renamed to invocation, and added detailed JavaDocs for invocation
and invocation.interceptor packages.  I bet you'll like it. :)

<snip/>

> Cool I was meaning to do that at some point thanks.  BTW there's one
> chain for everything. ... can you explain in docos the changes in
> semantics now?

I didn't compare the current interceptor architecture with the
previous one unfortunately.  You can safely think this new interface
is exactly same with that of Servlet filters.  As I told you, JavaDocs
will help you understand overall stuffs.  Please refer to
Invocation.java.

<snip/>

Cheers,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [apacheds] New interceptor interface.

Posted by Alex Karasulu <ao...@bellsouth.net>.
Trustin Lee wrote:

>Hi,
>
>I branched apacheds trunk and revamped interceptor architecture.  I
>hope you like it.
>
>* Replaced Invocation with Call and its subclasses which are more
>object-oriented
>  
>
I prefer Invocation - for some reason Call sounds strange.  Don't know 
why yet - guess I'm used to having an invocation bean.  Can you put some 
stuff together into a wiki or xdocs for this so I can see docos?  Like 
workflow for people customizing an interceptor chain.

>* Interceptor became much more like Servlet filters which is more user friendly.
>  
>
Cool I'm excited and anxious to take a peek.

>* JndiProvider doesn't manage interceptor chains. (new InterceptorChain does)
>  
>
Cool I was meaning to do that at some point thanks.  BTW there's one 
chain for everything. ... can you explain in docos the changes in 
semantics now?

>* JndiProvider doesn't control the flow of interceptors anymore. 
>Interceptors themselves do via invocation chaining exactly like
>Servlet filters.
>
>For now, almost all test cases pass.  Failing tests are due to the bug
>shutdown is not properly performed, and therefore I can say that all
>tests pass. :)
>
>WDYT about new Interceptor?
>
>  
>
Gimme a lil bit of time to take a look.

Thanks,
-Alex

>Trustin
>  
>