Chapter 5. Configuring JBoss EAP Subsystems to Work on Cloud Platforms
Chapter 5. Configuring JBoss EAP Subsystems to Work on Cloud Platforms Some JBoss EAP subsystems must be configured to work properly on cloud platforms, such as Amazon EC2 and Microsoft Azure. This is required because a JBoss EAP server is usually bound to a cloud virtual machine's private IP address, for example: 10.x.x.x , which is only visible from within the cloud platform. For certain subsystems, this address must also be mapped to a server's public IP address, which is visible from outside the cloud. 5.1. Web Services When a client makes a web service request using Service.create(wsdlURL, serviceName); , the user connects to the server public IP address, but is subsequently redirected to an address defined in the server configuration files in the webservices subsystem. By default, this address is USD{jboss.bind.address:127.0.0.1} , which means that on a cloud platform, the caller will be redirected to the server's private IP address and will be unable to resolve the request. The server's public IP address has to be configured in the wsdl-host element, using the following command: 5.2. Messaging When using messaging on a cloud platform, the connection factory that the client uses must have a connector pointing to the server's public IP address. For this reason a new connector and socket binding must be created for JBoss EAP servers running a full profile. The referenced http-public socket binding must be created within the socket-binding-group : Create the new http-connector element in the messaging subsystem: Set the connectors in the connection-factory , which will be used by clients. For example, configuration of RemoteConnectionFactory as the default connection will be: 5.3. Remoting Configuration for High Availability If you are using JBoss EAP HA features with clustered Jakarta Enterprise Beans on a cloud platform, some extra configuration for the remoting subsystem is required to ensure Jakarta Enterprise Beans clients can receive cluster view updates. This is done by configuring client-mappings for the remoting subsystem socket binding:
/subsystem=webservices:write-attribute(name=wsdl-host,value=PUBLIC_IP_ADDRESS) /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=http-public:add(host=PUBLIC_IP_ADDRESS,port=USD{jboss.http.port:8080}) /subsystem=messaging-activemq/server=default/http-connector=http-public-connector:add(endpoint=http-acceptor, socket-binding=http-public) /subsystem=messaging-activemq/server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=connectors, value=["http-public-connector"] /socket-binding-group=standard-sockets/socket-binding=http:write-attribute(name=client-mappings,value=[{ "destination-address" => "PUBLIC_IP_ADDRESS", "destination-port" => "8080" }])