3 Replies Latest reply on Aug 18, 2015 11:16 AM by jaikiran pai

    JBOSS EAP 6.4 deployment interface.

    Shruti Arora Newbie

      Hi,

       

      I want to deploy a war file in the JBOSS 6.4 from the java code.

      Till now I have tried :

       

      CallbackHandler callback = new PasswordClientCallbackHandler("abc",

        "ManagementRealm", "abc1.".toCharArray());

        ServerDeploymentManager sdm = ServerDeploymentManager.Factory.create(

        address, port, callback);

        DeploymentPlanBuilder dpb = sdm.newDeploymentPlan();

        AddDeploymentPlanBuilder add = dpb.add("xyz", new File(

        "C:\\temp\\xyz.war"));

        dpb = add.andDeploy();

        List<DeploymentAction> deploymentActions = dpb.getDeploymentActions();

        for (DeploymentAction deploymentAction : deploymentActions) {

        System.out.println(deploymentAction.getDeploymentUnitUniqueName());

        }

         Future<ServerDeploymentPlanResult> result = sdm.execute(dpb.build());

        while (!result.isDone()) {

        Thread.sleep(1000);

        }

        ServerDeploymentPlanResult planresult = result.get();

        ServerDeploymentActionResult actionresult = planresult

        .getDeploymentActionResult(planresult.getDeploymentPlanId());

       

      But it is not working. The connection is successful but the deployment is not happening.

      Is there some other interface or methods I should use?

       

      Please provide some inputs or pointer.

       

      Thanks