开发者

How to retrieve weblogic domain home?

hi guys I want to retrieve the name and path of the domain开发者_如何学Python of weblogic from my start up class. how can i achieve this?


Take a look at the getCurrentDirectory() of ServerRuntimeMBean


I haven't confirmed this, but you may be able to get at this information using an Application Life Cycle Listener.

An example here.

You can get a AppDeploymentMBea from the ApplicationContext in the ApplicationLifecycleEvent. AppDeploymentMBea has an InstallDir.


Java EE: ServletContext with a Listener can use getRealPath("..."), provided you let your deployment be not as war (where there are no files), but for instance as unpacked war. Otherwise getRealPath would yield null. Try getRealPath.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜