wlstModule 连接信息丢失
当将 wlst 与 WebLogic 10.3.5.0 版本一起使用时,我对以下情况感到困惑并希望得到答案。
给定一个标准 wlst 命令来连接到服务器,
connect('weblogic','welcome1','t3s://localhost:7002')
它会按预期连接到我的域中的 AdminServer 并显示以下提示:
Connecting to t3s://localhost:7004 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
wls:/base_domain/serverConfig>
但是,如果我执行以下命令,
import wlstModule as wlst
wlst.connect('weblogic','welcome1','t3s://localhost:7002')
我会得到以下响应
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
wls:/offline>
我遇到的情况是我有一个通用模块连接 AdminServer,虽然连接成功,但围绕需要 serverRuntimeConfig() 等的任何其他功能都无法工作,因为它认为未连接。
有谁知道使用第二种连接方法的正确机制,以及在使用导入的 wlstModule 时还需要做什么来保留连接状态。
When using wlst with a WebLogic 10.3.5.0 release I am puzzled by the following situation and hoping for an answer.
Given a standard wlst command to connect to a server
connect('weblogic','welcome1','t3s://localhost:7002')
it connects as expected to the AdminServer in my domain and presents the following prompt:
Connecting to t3s://localhost:7004 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
wls:/base_domain/serverConfig>
However, if I perform the following command
import wlstModule as wlst
wlst.connect('weblogic','welcome1','t3s://localhost:7002')
I get the following response
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
wls:/offline>
The situation I have is I have a common module for connecting the AdminServer and whilst the connection is successful, any other functions revolving around requiring a serverRuntimeConfig(), etc, do not work as it thinks it is not connected.
Does anybody have any idea on the correct mechanism for using the second approach for connecting and what else needs to occur to retain the connection state when using the imported wlstModule.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在与这个问题苦苦挣扎之后,我似乎找到了答案。
启动 java org.python.util.jython 后,您会收到提示。
>>>>>
在这里你可以做
import wlstModule as wlst
因此你应该一直使用 wlst!
wlst.connect()
a = wlst.cmo.getServers()
print (a)
问候,
Saulius
After struggling with this very problem, I seem to have found the answer.
after you start with java org.python.util.jython, you get a prompt.
>>>
here you can do
import wlstModule as wlst
hencefort you should use the wlst all the time!!
wlst.connect()
a = wlst.cmo.getServers()
print (a)
greetings,
Saulius