CDI 1.1:@Observes @Initialized(TransactionScoped.class)
应该工作吗?
@ApplicationScoped
public class MyClass {
public void processConversationScopedInit(@Observes
@Initialized(TransactionScoped.class) Object payload) {}
public void processConversationScopedDestroyed(@Observes
@Destroyed(TransactionScoped.class) Object payload) {}
}
这是 CDI 1.1 中的标准范围,但这里的列表中明显缺少它:
http://www.next-presso.com/2014/06/you-think-you-know-everything-about-cdi-events-think-again/
我似乎无法让它在 TomEE 7.0.5/OpenWebBeans 中工作,我很好奇这是否只是规范中的疏忽。谢谢!