【发布时间】:2016-07-18 19:55:41
【问题描述】:
我们在 MFP 7.1 上遇到了这种行为,而在 WL 6.2 上却不是这样,它在我们的团队中引发了警报。
问题说明:
在 Worklight.properties 我有一个条目:
ENV = MFP-DEV.
我正在使用和适配器来读取这个属性:
var environment = WL.Server.configuration["ENV"];
WL.Logger.info ("Env Enabled is :" + environment);
我编译我的服务器代码并创建要部署在我的实际服务器上的 war 文件。当我解压war文件时,“EVN”条目为空,这与我们在运行 WL 6.2 时的情况相同。
问题是在 WL 6.2 中,如果我没有在服务器级别分配值。此条目的适配器输出为"undefined"
WL.Logger.info ("Env Enabled is :" + environment);
// Env Enabled is undefined
但是,在 MFP 7.1 中进行相同的测试。结果如下:
WL.Logger.info ("Env Enabled is :" + environment);
// Env Enabled is MFP-DEV
这意味着 MFP 服务器实际上正在读取 worklight.properties 以获取分配的值,该值位于 war 文件中,如果 JNDI 值未在服务器级别设置。除非我在 JNDI 中输入一个实际值,否则服务器将始终在其 war 文件中读取默认值。
这引起了对以下属性的关注,因为我们没有在 JNDI 服务器上为它们分配任何值。
worklight.properties 中的默认值:
#The path to the keystore, relative to the server folder in the MobileFirst Project, for example: conf/my-cert.jks
wl.ca.keystore.path=conf/mfp-default.keystore
#The type of the keystore file. Valid values are jks or pkcs12.
wl.ca.keystore.type=jks
#The password to the keystore file.
wl.ca.keystore.password=jYCuzgPNXNMLKfmlk6WM
#The alias of the entry where the private key and certificate are stored, in the keystore.
wl.ca.key.alias=mfp-default-cert
#The password to the alias in the keystore.
wl.ca.key.alias.password=82ShbwXc0KD5ni9Zc6yq
服务器 JNDI:
关于如何处理这个问题有什么建议吗?
服务器版本:7.1.0.00.20160401-2103
【问题讨论】:
标签: ibm-mobilefirst mobilefirst-server