Guest User

Untitled

a guest
Jun 17th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. diff --git a/server/src/main/java/org/jboss/as/server/operations/NativeManagementWriteAttributeHandler.java b/server/src/main/java/org/jboss/as/server/operations/NativeManagementWriteAttributeHandl
  2. index aec0bc2..9f999ab 100644
  3. --- a/server/src/main/java/org/jboss/as/server/operations/NativeManagementWriteAttributeHandler.java
  4. +++ b/server/src/main/java/org/jboss/as/server/operations/NativeManagementWriteAttributeHandler.java
  5. @@ -96,12 +96,12 @@ public class NativeManagementWriteAttributeHandler extends AbstractWriteAttribut
  6. private void installNativeManagementService(final OperationContext context, final ModelNode subModel, final ServiceVerificationHandler verificationHandler) throws OperationFailedException {
  7.  
  8. // Remove the old connector
  9. - final ModelNode portNode = NativeManagementResourceDefinition.NATIVE_PORT.resolveModelAttribute(context, subModel);
  10. - int port = portNode.isDefined() ? portNode.asInt() : 0;
  11. + final ModelNode socketBinding = NativeManagementResourceDefinition.SOCKET_BINDING.resolveModelAttribute(context, subModel);
  12. + if(socketBinding == null || !socketBinding.isDefined()) {
  13. + final ModelNode portNode = NativeManagementResourceDefinition.NATIVE_PORT.resolveModelAttribute(context, subModel);
  14. + }
  15. ManagementRemotingServices.removeConnectorServices(context, ManagementRemotingServices.MANAGEMENT_CONNECTOR);
  16. -
  17. NativeManagementAddHandler.installNativeManagementConnector(context, subModel, ManagementRemotingServices.MANAGEMENT_ENDPOINT, context.getServiceTarget(), verificationHandler, null);
  18. -
  19. }
Add Comment
Please, Sign In to add comment