【发布时间】:2014-06-11 09:18:20
【问题描述】:
使用 Arquillian 1.1.4.Final 和 Tomee 1.6.0.2
从 Tomee information 获取关于 arqullian 适配器的 tomee-plus-remote 配置文件设置,并将其放入 Maven pom.xml(activeByDefault true)。
目标是将 MQ JCA rar 部署到远程 Tomee 和 configure 到 MQ 的连接工厂。
最初将 arqullian.xml 设置为:
<container qualifier="tomee" default="true">
<configuration>
<property name="httpPort">-1</property>
<property name="stopPort">-1</property>
</configuration>
</container>
通过 JUnit 运行不确定为什么 webprofile 被初始化和启动而不是 plus(当我在 Maven 中指定了 tomee plus 时):
Info: Succeeded in installing singleton service
jun 11, 2014 11:07:52 FM org.apache.openejb.config.ConfigurationFactory init
Info: openejb configuration file is 'C:\Users\MYG\AppData\Local\Temp\arquillian-apache-tomee\apache-tomee-webprofile-1.6.0.2\conf\tomee.xml'
另一件事是如何加载 tomee.xml 配置。认为 arquillian.xml 中的“serverXml”(设置为 src/test/resources/tomee.xml)会起作用,但是该 xml 中的所有内容都不会被识别为有效规则。无法将 Deployments 等指令添加为 one does 与资源。那么如何从 arquillian 配置远程 tomee?
【问题讨论】:
-
删除配置文件 (tomee-plus-remote) 并将分类器添加到 arquillian.xml。这让 plus zip 运行,而不是 webprofile。但是加载 tomee.xml 的问题是一样的。 “未找到匹配的规则”时出现 NullPointerException。
-
Okej。 serverXml 用于通常的“server.xml”的 Catalina 负载。人们如何通过 Arquillian 加载自定义的 tomee.xml 文件?
标签: apache-tomee jboss-arquillian