Hi,
I'm interested if could be feasible to change of API of CommonDeployableContainer to be able to reach ManagementClient from an Arquillian life cycle event observers. I think kind of making public of this method https://github.com/wildfly/wildfly-arquillian/blob/master/common/src/main/java/org/jboss/as/arquillian/container/CommonDeployableContainer.java#L168
My use case and reasoning:
I test recovery process of TM for EAP. I have configured a byteman rule which kills JVM sometimes in the middle of JBoss EAP processing. Then I start the EAP contaner again and checking the recovery process to finish transactions. I do such thing in all of my tests in my testsuite.
I've noticed that after some time of running there is many of hanging threads. Finally I found out that's because of not closed connections from management clients which are held by Arquillian. That's because client is not closed after the JBoss EAP server was killed abruptly. I would like to close such connection (meaning to call getManagementClient().close()) before the EAP server will be started again. I would like to create an Arquillian extension hook where I would get the container and reach the client for me being able to close it - kind of ((CommonDeployableContainer) container.getDeployableContainer()).getManagementClient().close().
Do you think such opening of api would be possible? Or would you have some different idea how to get it working?