Created
March 5, 2012 16:13
-
-
Save iocanel/1979056 to your computer and use it in GitHub Desktop.
Using Karaf's AdminService for creating instances from a pax-exam karaf unit test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void createInstances() { | |
//Install broker feature that is provided by FuseESB | |
executeCommands("admin:create --feature broker brokerChildInstance"); | |
//Install producer feature that provided by imaginary feature repo. | |
executeCommands("admin:create --featureURL mvn:imaginary/repo/1.0/xml/features --feature producer producerChildInstance"); | |
//Install producer feature that provided by imaginary feature repo. | |
executeCommands("admin:create --featureURL mvn:imaginary/repo/1.0/xml/features --feature consumer consumerChildInstance"); | |
//start child instances | |
executeCommands("admin:start brokerChildInstance"); | |
executeCommands("admin:start producerChildInstance"); | |
executeCommands("admin:start consumerChildInstance"); | |
//You will need to destroy the child instances once you are done. | |
//Using @After seems the right place to do that. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment