如果我在内部使用EJB和使用RESTeasy 2.1的Web应用程序,我是否需要按this document中所述注释接口?
看来the document似乎正在展示如何配置要公开发布的EJB - 可通过URL访问。
当我使用the document中描述的注释时,我收到此错误:
14:01:50,294 ERROR [STDERR] 1979 [main] INFO org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap - Adding scanned resource: com.ccorp.report.ejb3.TestBean
14:01:50,457 ERROR [[/ReportAPI]] Exception sending context initialized event to listener instance of class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
java.lang.RuntimeException: javax.naming.NameNotFoundException: Test not bound
我启用了RESTeasy扫描,并且还添加了添加的web.xml文件;
<context-param>
<param-name>resteasy.jndi.resources</param-name>
<param-value>Test/String</param-value>
</context-param>
非常欢迎任何想法!
答案 0 :(得分:1)
查看我在另一篇文章中给出的答案: Accessing @Local Session Bean from an exposed RESTeasy interface