Hi,
The InstanceInterceptor do not need to know if
CMT or BMT. The interceptor element attributes are
simply restrictions that must be met for an
interceptor to be added.
I guess this comes from thinking of two different
interceptor chain configurations due to the different
ordering.
The following two snippets should be semantically
equivalent:
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
<interceptor
transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
<interceptor
transaction="Container">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
<interceptor
transaction="Bean">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
<interceptor transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor>
</container-interceptors>
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
<interceptor
transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
<interceptor>org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
<interceptor transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor>
</container-interceptors>
In this example I removed the MetricsInterceptor
to simplify. But couldn't that just be placed as
the last one in the container interceptor chain
configuration for both BMT and CMT, or is there
some reason it should come before the Instance-
Interceptor as it currently does for CMT?
Not sure about your last set of questions, as I
haven't seen Scott Starks implementation yet.
Best Regards,
Ole Husgaard.
marc fleury wrote:
>
> Hey,
>
> yes I have been requesting that for the longest time. An externalization of
> the interceptor stacks in XML makes the whole container fully configurable.
> Whether we will use it, I don't know, it will certainly make the stacks
> modular.
>
> Ok only 1 remark:
>
> |The standardjboss.xml config file changes to include the current
> |ContainerFactory
> |interceptor setups. An example:
> | <container-configuration>
> | <container-name>Standard Stateless SessionBean</container-name>
> | <call-logging>false</call-logging>
> |
> |<container-invoker>org.jboss.ejb.plugins.jrmp.server.JRMPContainerI
> |nvoker</container-invoker>
> | <container-interceptors>
> | <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
> | <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
> | <!-- CMT -->
> | <interceptor
> |transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</int
> |erceptor>
> | <interceptor transaction="Container"
> |metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</int
> |erceptor>
> | <interceptor
> |transaction="Container">org.jboss.ejb.plugins.StatelessSessionInsta
> |nceInterceptor</interceptor>
>
> Why does the SSI need to know that the transaction is "Container", in fact
> why do you specify it in the name?
>
> | <!-- BMT -->
> | <interceptor
> |transaction="Bean">org.jboss.ejb.plugins.StatelessSessionInstanceIn
> |terceptor</interceptor>
> | <interceptor
> |transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor>
> | <interceptor transaction="Bean"
> |metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</int
> |erceptor>
> | </container-interceptors>
>
> same here.
>
> |
> |<instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</
> |instance-pool>
> |...
> | </container-configuration>
> |
> |Let me know if there are any objections/questions. If not, I'll
> |commit the change
> |late Monday night.
>
> how do we change one interceptor I can't see how we can do it "differential"
> we need to specify the full stack (which is ok for now I guess). Also how
> do we specify a new stack, in jboss.xml I would assume, do you have it
> documented? do you have the logic to parse that information in jboss.xml ?
> does it overwrite the standardjboss.xml?
>
> marc
>
> |
> |
> |