[英]Jboss Message Bean (EJB3) - configuration name
Is there a way of specifying the configuration name of a message bean through annotations? 有没有一种方法可以通过注释指定消息bean的配置名称? In the
jboss.xml
descriptor you can have different configurations and bind the beans to a particular config: 在
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>
Then in standardjboss.xml
you can specify a custom interceptor stack, etc. for the "My Custom Message Driven Bean" configuration: 然后,在
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>
Is there a simple way to do the same by using annotations? 有没有一种简单的方法可以通过使用注释来做到这一点? I don't mind using vendor-specific annotations (ie, non-standard jboss annotations).
我不介意使用特定于供应商的注释(即非标准的jboss注释)。
As far as I know it is not possible. 据我所知这是不可能的。 Interceptors are defined in XML only in JBoss.
拦截器仅在JBoss中以XML定义。 I was sure of that for 4, but looking around in 5 didn't find any changes in that area.
我确定4可以做到这一点,但在5处环顾四周并没有发现该区域有任何变化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.