[英]Jboss Message Bean (EJB3) - configuration name
有没有一种方法可以通过注释指定消息bean的配置名称? 在jboss.xml
描述符中,您可以具有不同的配置并将Bean绑定到特定的配置:
<message-driven>
<ejb-name>PushUserAgentBean</ejb-name>
<destination-jndi-name>queue/PushUserAgent</destination-jndi-name>
<configuration-name>My Custom Message Driven Bean</configuration-name>
</message-driven>
然后,在standardjboss.xml
,可以为“我的自定义消息驱动的Bean”配置指定自定义拦截器堆栈等:
<container-configuration>
<container-name>My Custom Message Driven Bean</container-name>
<call-logging>false</call-logging>
<invoker-proxy-binding-name>custom-message-driven-bean</invoker-proxy-binding-name>
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.RunAsSecurityInterceptor</interceptor>
有没有一种简单的方法可以通过使用注释来做到这一点? 我不介意使用特定于供应商的注释(即非标准的jboss注释)。
据我所知这是不可能的。 拦截器仅在JBoss中以XML定义。 我确定4可以做到这一点,但在5处环顾四周并没有发现该区域有任何变化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.