JBoss Community

Detyped Description of the AS 7 Management Model

new comment by Stan Silvert View all comments on this document

Hi Brian,

 

I'm running in a servlet environment and I if I'm in domain mode I need to get the proper ModelControllerClient.  Is the following always guaranteed to work for finding the host address and port of the domain controller?  Is there a better way to get these values?

 

if (isDomainMode) {

                 InetAddress domainAddress = InetAddress.getByName(System.getProperty("jboss.domain.master.address"));

                 int domainPort = Integer.parseInt(System.getProperty("jboss.domain.master.port", "9999"));

                 domainDmrClient = ModelControllerClient.Factory.create(domainAddress, domainPort);

   }