使用Embedded Jboss运行JUnit测试

时间:2021-08-03 15:41:23

I need to run junit tests for classes using ejb3 beans. In our case setting up jboss just for this purpose is not an option and therefore we need an alternative way to simulate the ejb communication. I've read that this should be possible with Embedded Jboss's EJB3StandaloneBootstrapper, but the problem is that I cannot get it to work properly.

我需要使用ejb3 bean为类运行junit测试。在我们的例子中,为此目的设置jboss不是一种选择,因此我们需要一种模拟ejb通信的替代方法。我已经读过,嵌入式Jboss的EJB3StandaloneBootstrapper应该可以实现这一点,但问题是我无法让它正常工作。

I was wondering if anyone of you know of a good tutorial which explains all the details, including how to configure the various files (embedded-jboss-beans.xml, ejb3-interceptor-aop.xml etc). With the embedded jboss package came a tutorial for junit with example code, however, the build script in it failed. If you don't know a tutorial, do you at least know where I could find a working example of embedded jboss + junit?

我想知道你是否有人知道一个很好的教程,它解释了所有的细节,包括如何配置各种文件(embedded-jboss-beans.xml,ejb3-interceptor-aop.xml等)。随着嵌入式jboss包提供了带有示例代码的junit教程,但是,其中的构建脚本失败了。如果你不懂教程,你至少知道我在哪里可以找到嵌入式jboss + junit的工作示例吗?

2 个解决方案

#1


I did a presentation on using the embedded JBoss and had a download with example code. Hope this helps.

我做了一个关于使用嵌入式JBoss的演示文稿,并下载了示例代码。希望这可以帮助。

#2


I believe Jakarta Cactus is the proper framework to run such tests.

我相信Jakarta Cactus是运行此类测试的合适框架。

#1


I did a presentation on using the embedded JBoss and had a download with example code. Hope this helps.

我做了一个关于使用嵌入式JBoss的演示文稿,并下载了示例代码。希望这可以帮助。

#2


I believe Jakarta Cactus is the proper framework to run such tests.

我相信Jakarta Cactus是运行此类测试的合适框架。