3 Replies Latest reply on Sep 21, 2016 10:31 AM by mayerw01

    How to programmatically call wildfly inside an application

    koldar

      Hello to all!

      First of all thanks to everyone for the job you're doing here.

       

      I'm doing a project right now using OSGi framework and I would like to add a bundle allowing to start a Wildfly application server, stop it, deploy an application and undeploy it. Basically I would like to create these 4 functions:

       

      public void startWildflyServer();

      public void stopWildflyServer();

      public void deployApplication(App war);

      public void undeployApplication(App war);

       

      I've tried to search online for a simple method to programmatically call these method, but to no success. Sorry if I bother you with this silly question, but I really want to embed Wildfly inside this software! Reference to wildfly source code are highly appreciated: I looked at the source but, given its size, it would be great if someone could suggest me a class/ a method /something to analyze.

       

      PS: some additional information. During my online search I found wildfly-swarm. It seems a really cool project, allowing you to create an uber wildfly jar. The problem is that it embeds also your business logic with it. I would love something similar to it, but that simply allows me to deploy/undeploy application.

       

      Hope I could convey in the most clear way my question,

      Thanks again