Hi guys,

what is the best way to deploy waiting deployments?

As I understand it right, the only time when waiting deployments have
a chance to be deployed is when their deployer is started.

That works with existing deployers. But FoeDeployer has dynamic
diployment abilities, i.e. once it is able to deploy some deployments and
later it could not be able to deploy them or could be able to deploy
deployments that couldn't be able to deploy earlier.
This is due to adding and removing vendor specific convertors (that
are mbeans and depend on foe-deployer).

So, for now when new convertor is added I have to try to deploy waiting
deployments. I do it this way:

Collection waitingDeployments = mMainDeployer.listWaitingForDeployer();
if((waitingDeployments != null) && (waitingDeployments.size() > 0))
{
   for(Iterator iter = waitingDeployments.iterator(); iter.hasNext();)
   {
      DeploymentInfo di = (DeploymentInfo)iter.next();

      // check whether the convertor accepts the deployment
      if(!newConvertor.accepts(di, null)) continue;
            
      log.debug("trying to deploy with new convertor: " + di.shortName);
      try
      {
         mMainDeployer.undeploy(di);
         mMainDeployer.deploy(di);
      }
      catch (DeploymentException e)
      {
         log.error("DeploymentException while trying to deploy a package with a new 
convertor", e);
      }
   }
}

Looks roughly as for me. What do you think? Any suggestions?

TIA
-- 
Best regards,
 Alex Loubyansky




-------------------------------------------------------
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members! 
JabberConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to