1 Reply Latest reply on Nov 12, 2010 5:26 AM by emuckenhuber

    JBoss 5.1 DeploymentManager threads issue

    ipetrysh

      Hello,

       

           I use JBoss 5.1 org.jboss.deployers.spi.management.deploy.DeploymentManager for deploy application on jboss server remotely from java code. Applications deploy correctly, but after that I have three threads that are still running:

       

      1. Daemon Thread [ServerSocketRefresh] (Running) ;

      2. Thread [AcceptorThread[ServerSocket[addr=/someip,port=0,localport=61954]]] (Running) 

      3. Thread [WorkerThread#0[someip:58563]] (Running)

       

      therefore my program (main thread) can't be closed and Windows proces also.

       

      I think that my issue is related to:

      1. https://jira.jboss.org/browse/JBREM-519

      2. http://community.jboss.org/message/367855#367855

       

      Java code that use for deploy applications:

              private String doDeploy(String deploymentName, URL deploymentURL)
                  throws Exception {
      
              DeploymentManager deployMgr = getDeploymentManager();
              if (deployMgr == null)
                  throw new IllegalStateException("Null deployment manager.");
              
              String[] repositoryNames = null;
              
              // Distribute an application file
              DeploymentProgress distribute = deployMgr.distribute (deploymentName, deploymentURL, true);
              System.out.println("Start deploy " + deploymentName);
              distribute.run();
              
              // Check if the deploy failed
              checkFailed(distribute);
      
              // Get the deployed names
              repositoryNames = distribute.getDeploymentID().getRepositoryNames();
      
              // Start the deployment
              DeploymentProgress start = deployMgr.start(repositoryNames);
              start.run();
              checkFailed(start);
              
              return repositoryNames[0];
      
          }
      

       

      Could you please help me with this issue, perhaps I do something wrong?

       

      Thanks a lot