- Common ways to obtain ManagementClient
private void myMethod () {ManagementClient m =
Instance instance;instance.get()
InstanceProducer instanceProducer;instanceProducer.get()
- Smart code suggestions by Codota
}
public URI getRemoteEjbURL() { if (ejbUri == null) { if (rootNode == null) { try { readRootNode(); } catch (Exception e) { throw new RuntimeException(e); } } String socketBinding = rootNode.get("subsystem").get("remoting").get("connector").get("remoting-connector").get("socket-binding").asString(); ejbUri = getBinding("remote", socketBinding); } return ejbUri; } //-------------------------------------------------------------------------------------||
/** * @return The base URI or the web susbsystem. Usually http://localhost:8080 */ public URI getWebUri() { if (webUri == null) { try { if (rootNode == null) { readRootNode(); } } catch (Exception e) { throw new RuntimeException(e); } ModelNode socketBinding = rootNode.get("subsystem").get("web").get("connector").get("http").get("socket-binding"); if(!socketBinding.isDefined()) { try { webUri = new URI("http://localhost:8080"); } catch (URISyntaxException e) { throw new RuntimeException(e); } } else { webUri = getBinding("http", socketBinding.asString()); } } return webUri; }