synchronized void openConnection(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception {
        boolean ok = false;
        final Connection connection = connectionManager.connect();
        try {
            channelHandler.executeRequest(new ServerRegisterRequest(), null, callback);
            // HC is the same version, so it will support sending the subject
            channelHandler.getAttachments().attach(TransactionalProtocolClient.SEND_IDENTITY, Boolean.TRUE);
            channelHandler.getAttachments().attach(TransactionalProtocolClient.SEND_IN_VM, Boolean.TRUE);
            channelHandler.addHandlerFactory(new TransactionalProtocolOperationHandler(controller, channelHandler, responseAttachmentSupport));
            ok = true;
        } finally {
            if(!ok) {
                connection.close();
            }
        }
    }
synchronized void openConnection ( final ModelController controller , final ActiveOperation . CompletedCallback < ModelNode > callback ) throws Exception { boolean ok = false ; final Connection connection = connectionManager . connect ( ) ; try { channelHandler . executeRequest ( new ServerRegisterRequest ( ) , null , callback ) ; channelHandler . getAttachments ( ) . attach ( TransactionalProtocolClient . SEND_IDENTITY , Boolean . TRUE ) ; channelHandler . getAttachments ( ) . attach ( TransactionalProtocolClient . SEND_IN_VM , Boolean . TRUE ) ; channelHandler . addHandlerFactory ( new TransactionalProtocolOperationHandler ( controller , channelHandler , responseAttachmentSupport ) ) ; ok = true ; } finally { if ( ! ok ) { connection . close ( ) ; } } }
Connect to the HC and retrieve the current model updates.

@param controller the server controller
@param callback the operation completed callback

@throws IOException for any error