有没有使用CLI将模块添加到JBoss之前进行检查的方法? [英] Is there a way to check before adding module to JBoss using CLI?
本文介绍了有没有使用CLI将模块添加到JBoss之前进行检查的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在使用JBoss CLI调用添加之前,有没有一种方法可以检查模块是否尚未添加?
Is there a way to check module hasn't already been added before calling adding using JBoss CLI?
例如
module add --name=org.mysql --resources=/home/abc/drivers/mysql/MySQL5.jar
# Want to do similar check for module add
if (outcome != success) of /subsystem=datasources/jdbc-driver=org.mysql:read-resource
# Add it...
end-if
原因试图添加已经存在的模块会导致错误.
Reason is trying to add a module that already exists causes an error.
推荐答案
在域模式下,您可以执行此操作.
When in domain mode, you can do that.
这是检查模块是否存在的方法:
Here's how you can check a module's existence:
if (outcome != success) of /host=master/core-service=module-loading/:list-resource-loader-paths(module=your.module.name)
echo install your.module.name ...
module add --name=your.module.name --dependencies=.. --resources=....jar
else
echo module your.module.name already installed
end-if
这篇关于有没有使用CLI将模块添加到JBoss之前进行检查的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文