David Jencks wrote:

> Whether you put the state in the interceptor instance or the head of the
> chain, you need the same state info.
> 
> If you put it in the head of the chain, you either have to put instance
> variables specific to the interceptors that will be in the chain if you
> want any compiler type checking help or use an untyped map and hope for the
> best if you want it generic.


Seems logical to put the MBeanInfo object of the container in the thingy 
that gets passed on. The interceptors can the extract whatever metadata 
about the container they want from that.


> If you put the state info in the interceptor instance, you can have all the
> compiler type checking you can stand, you keep the state info needed for
> the interceptor encapsulated in the interceptor (where, I will say, it
> belongs), and the interceptor becomes much more self contained.


What if two interceptors are interested in the same metadata?

> The only feature the stateless approach gets not easily available with the
> statefull approach is the ability to change which interceptors are called
> during the chain traversal.  I don't see any use for this meta-meta
> programming at this time.


Also, a stateless interceptor can be used for any container. If you want 
to just have tx's, you'd go find a tx-interceptor, and put it in the 
invocation chain. The interceptor will extract the metadata it needs 
about the container using the MBeanInfo, and do its work.

If it is stateful, how will the interceptor get its metadata? I hope it 
won't load it itself... that would make it dependent on the type of 
object the interceptor chain is being used on (since it may be used on 
things that are not EJB containers).

/Rickard

-- 
Rickard Öberg


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to