可以将 ejb 拦截器打包到库中吗?
如果是这样,你会怎么做?
我有一个 ejb @javax.interceptor.AroundInvoke
拦截器,我喜欢将其移入库中以供重用。我将代码移动到一个库中,修复了 Maven 中的依赖关系,现在所有代码都编译得很好。仅在部署时我收到以下错误消息:
09.02.2011 14:19:48 com.sun.logging.LogDomains$1 log
SCHWERWIEGEND: Exception while invoking class org.glassfish.ejb.startup.EjbApplication start method
java.lang.RuntimeException: java.lang.ClassNotFoundException:
And if so how do you do it?
I have got an ejb @javax.interceptor.AroundInvoke
interceptor which I like to move into a library for reuse. I moved the code into a library fixed the dependencies in maven and all compiles well now. Only on deploy I get the following error message:
09.02.2011 14:19:48 com.sun.logging.LogDomains$1 log
SCHWERWIEGEND: Exception while invoking class org.glassfish.ejb.startup.EjbApplication start method
java.lang.RuntimeException: java.lang.ClassNotFoundException:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自JSR 318:Enterprise JavaBeans,版本 3.1 - EJB 核心合同和要求:
所以我会说是的,您可以将拦截器类打包在库 .jar 文件中
检查:1) 库实际上已打包并与 ejb-jar 文件一起部署; 2) 如上所述,Manifest 文件中引用了库 .jar。
From JSR 318: Enterprise JavaBeans, Version 3.1 - EJB Core Contract and Requirements:
So I'd say yes, you can package the interceptor class in a library .jar file.
Check that: 1) the library actually got packaged in and deployed with the ejb-jar file; and 2) the library .jar is referenced in the Manifest file as described above.