實踐背景:基於wildfly開發分布式服務,包括web服務,DAS(數據訪問服務)服務及其它業務服務,全部使用分布式方式開發與部署。
實踐1:分布式服務(服務端角色)配置
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:0.0.0.0}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:0.0.0.0}"/> </interface> <interface name="unsecure"> <inet-address value="${jboss.bind.address.unsecure:0.0.0.0}"/> </interface> </interfaces>
注:此配置目的是使用ip地址可訪問服務,配置之前只能使用localhost或127.0.0.1訪問。
2016-12-13 14:43:06,894 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) WFLYDS0013: Started FileSystemDeploymentService for directory /home/pacs/wildfly/standalone/deployments 2016-12-13 14:43:07,133 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://0.0.0.0:9990/management 2016-12-13 14:43:07,134 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://0.0.0.0:9990 2016-12-13 14:43:07,134 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) started in 4207ms - Started 209 of 385 services (210 services are lazy, passive or on-demand)