Retrieve current server's provider URL at runtime on weblogic (non-deprecated way)
问题 I have an Singleton Service deployed to a Weblogic cluster, i'd like to know the provider url (listen address and port) of the server on which the singleton service is deployed from the singleton itself (server side, not logs). I found this (old) article from Oracle, and wrote this method to construct the provider url. private static String getCurrentServerUrl() throws NamingException { weblogic.management.MBeanHome home = (weblogic.management.MBeanHome) new Environment().getInitialContext()