【发布时间】:2014-01-08 00:55:11
【问题描述】:
我刚刚在 GlassFish 服务器下发生了臭名昭著的 JavaEE CDI 错误:
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:Exception List with 2 exceptions:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001437 Normal scoped bean class ASController is not proxyable because the type is final or it contains a final method public final void ASController.selectPath(org.primefaces.event.NodeSelectEvent) - Managed Bean [class ASController] with qualifiers [@Default @Any @Named].
这个错误非常明确,因为他不喜欢 CDI bean 中的 final 方法,但我不明白为什么。
在这个链接
http://docs.jboss.org/weld/reference/1.1.0.Final/en-US/html_single/#d0e1429
他们解释说这与序列化有关,但我不明白为什么用 final 方法序列化一个类应该比用非 final 方法更难。
【问题讨论】:
标签: java jakarta-ee cdi