Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
可嵌入EJB(JBoss)初始化选项_Jboss_Options_Ejb 3.1_Embeddable - Fatal编程技术网

可嵌入EJB(JBoss)初始化选项

可嵌入EJB(JBoss)初始化选项,jboss,options,ejb-3.1,embeddable,Jboss,Options,Ejb 3.1,Embeddable,我已经使用以下依赖项创建了一个Junit套件测试,其中包含可嵌入EJB: <dependency> <groupId>org.jboss.ejb3.embedded</groupId> <artifactId>jboss-ejb3-embedded-standalone</artifactId> <version>1.0.0-alpha-2</version> </dependenc

我已经使用以下依赖项创建了一个Junit套件测试,其中包含可嵌入EJB:

<dependency>
    <groupId>org.jboss.ejb3.embedded</groupId>
    <artifactId>jboss-ejb3-embedded-standalone</artifactId>
    <version>1.0.0-alpha-2</version>
</dependency>

org.jboss.ejb3.embedded
jboss-ejb3-embedded-standalone
1.0.0-α-2
但是,当通过“EJBContainer.createEJBContainer();”启动容器(JBoss)时,我不知道如何传递以下选项:

usage: run.sh [options]
-h, --help                  Show this help message
-V, --version               Show version information
--                          Stop processing options
-D<name>[=<value>]          Set a system property
-d, --bootdir=<dir>         Set the boot patch directory; Must be absolute or url
-p, --patchdir=<dir>        Set the patch directory; Must be absolute or url
-n, --netboot=<url>         Boot from net with the given url as base
-c, --configuration=<name>  Set the server configuration name
-B, --bootlib=<filename>    Add an extra library to the front bootclasspath
-L, --library=<filename>    Add an extra library to the loaders classpath
-C, --classpath=<url>       Add an extra url to the loaders classpath
-P, --properties=<url>      Load system properties from the given url
-b, --host=<host or ip>     Bind address for all JBoss services
-g, --partition=<name>      HA Partition name (default=DefaultDomain)
-u, --udp=<ip>              UDP multicast address
-l, --log=<log4j|jdk>       Specify the logger plugin type
用法:run.sh[选项] -h、 --帮助显示此帮助消息 -五、 --版本显示版本信息 --停止处理选项 -D[=]设置系统属性 -d、 --bootdir=设置引导补丁目录;必须是绝对值或url -p、 --patchdir=设置补丁目录;必须是绝对值或url -n、 --netboot=以给定url为基础从网络启动 -c、 --配置=设置服务器配置名称 -B、 --bootlib=将额外的库添加到前引导类路径 -五十、 --library=向加载程序类路径添加额外的库 -C、 --classpath=向加载程序类路径添加额外的url -P、 --properties=从给定url加载系统属性 -b、 --主机=所有JBoss服务的绑定地址 -g、 --分区=HA分区名称(默认值=DefaultDomain) -u、 --udp=udp多播地址 -l、 --log=指定记录器插件类型 更具体地说,选项“-c”将默认服务器节点更改为专门为测试创建的自定义服务器节点

我曾尝试在Surfire配置的“argLine”上添加此选项,但它仅适用于JVM参数,如permgen size

编辑:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.15</version>
    <configuration>
        <argLine>
            -Djboss.home=${JBOSS_HOME} 
            -Xmx512m 
            -XX:MaxPermSize=256m 
            -Djava.endorsed.dirs=${JBOSS_HOME}/lib/endorsed  
            -Djboss.messaging.ServerPeerID=1 
            -Djboss.service.binding.set=ports-01

            -c=tests-node ******This does not works!******

        </argLine>
        <includes> 
            <include>**/AllTests.java</include>
        </includes>
    </configuration>
</plugin>

org.apache.maven.plugins
maven surefire插件
2.15
-Djboss.home=${JBOSS_home}
-Xmx512m
-XX:MaxPermSize=256m
-Djava.annowed.dirs=${JBOSS_HOME}/lib/annowed
-Djboss.messaging.ServerPeerID=1
-Djboss.service.binding.set=ports-01
-c=测试节点******这不起作用******
**/AllTests.java
有什么想法吗