Java消息系统性能优化全解析
1. 单部署单元定制
在之前的示例中,我们在EJB容器级别进行了更改,但这是一种强力更改,因为它会将新的拦截器栈应用于所有EJB。我们可以选择一种更温和的解决方案,即在部署单元中添加自定义域到 *–aop.xml 文件中。
以下是一个可用于非事务性EJB的示例:
<?xml version="1.0" encoding="UTF-8"?>
<aop xmlns="urn:jboss:aop-beans:1.0">
<domain name="Non Tx Stateless Bean" extends="Intercepted Bean" inheritBindings="false">
<bind pointcut="execution(public * *->*(..))">
<interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
<interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
<stack-ref name="EJBInterceptors"/>
</bind>
</domain>
</aop>
注意 inheritBinding
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



