Reattempt initialization for karaf managed container

I have following use case:
- I want to use arquillian-osgi to test services in fabric8. However, during initialization process JMX connection is restarted a few times - this causes KarafManagedDeployableContainer to break. 
I came up with following solution, basically it attempts to init container a few times, restarting JMX connection after each failure. 
Don't know if it such approach is OK for you, it works for me, I'm open for suggestions