Ce contenu n'est pas disponible dans la langue sélectionnée.
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 mapped to a server’s public IP address, which is visible from outside the cloud.
5.1. Web Services Copier lienLien copié sur presse-papiers!
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 ${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:
/subsystem=webservices:write-attribute(name=wsdl-host,value=PUBLIC_IP_ADDRESS)
/subsystem=webservices:write-attribute(name=wsdl-host,value=PUBLIC_IP_ADDRESS)
5.2. Messaging Copier lienLien copié sur presse-papiers!
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-publicsocket binding must be created within thesocket-binding-group:/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=http-public:add(host=PUBLIC_IP_ADDRESS,port=${jboss.http.port:8080})/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=http-public:add(host=PUBLIC_IP_ADDRESS,port=${jboss.http.port:8080})Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the new
http-connectorelement in themessagingsubsystem:/subsystem=messaging-activemq/server=default/http-connector=http-public-connector:add(endpoint=http-acceptor, socket-binding=http-public)
/subsystem=messaging-activemq/server=default/http-connector=http-public-connector:add(endpoint=http-acceptor, socket-binding=http-public)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
connectorsin theconnection-factory, which will be used by clients. For example, configuration ofRemoteConnectionFactoryas the default connection will be:/subsystem=messaging-activemq/server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=connectors, value=["http-public-connector"]
/subsystem=messaging-activemq/server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=connectors, value=["http-public-connector"]Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Remoting Configuration for High Availability Copier lienLien copié sur presse-papiers!
If you are using JBoss EAP HA features with clustered EJBs on a cloud platform, some extra configuration for the remoting subsystem is required to ensure EJB clients can receive cluster view updates.
This is done by configuring client-mappings for the remoting subsystem socket binding:
/socket-binding-group=standard-sockets/socket-binding=http:write-attribute(name=client-mappings,value=[{ "destination-address" => "PUBLIC_IP_ADDRESS", "destination-port" => "8080" }])
/socket-binding-group=standard-sockets/socket-binding=http:write-attribute(name=client-mappings,value=[{ "destination-address" => "PUBLIC_IP_ADDRESS", "destination-port" => "8080" }])