Hello David,
thank you for your feedback.
DJ> Maybe you should factor out the "try all waiting packages with new
DJ> deployer" functionality so it can be triggered by a new deployer or you can
DJ> call it directly from the foe deployer.
Factor out?.. What do you mean? In what place?
For now, all foe apps are deployed with FoeDeployer. All converters
inherit Converter interface. Like deployers are registered with
MainDeployer when started with MainDeployer.addDeployer(), converters are
registered with FoeDeployer by FoeDeployer.addConverter(). In
FoeDeployer.addConverter() converter is added to the list of
converters and in this method I try to deploy waiting deployments. So,
it's done in FoeDeployer.
Do you mean adding functionality to try redeploy waiting deployments to MainDeployer?
I follow the idea that FoeDeployer isn't a core service of JBoss and
shouldn't cause changes of core JBoss classes if possible.
DJ> Or you could change your design a bit and make each converter into a
DJ> subdeployer that registers with MainDeployer, using centralized services
DJ> from a FoeDeploymentServices mbean. (Just an idea, I haven't actually
DJ> looked at your design).
This is the solution too. Though, I would, probably, inherit
converters from FoeDeployer and make them independent in this case.
For now we agreed with Andreas to not change the existing design and
implement at least WebLogicConvertor to get something actually working.
But nevertheless I had to redeploy waiting deployments. So, that's the
reason of the question. I think for now I just leave it as it is.
Thank you again! :)
alex
DJ> please refactor MainDeployer before copying its functionality.
DJ> david jencks
DJ> On 2002.06.26 13:55:53 -0400 Alex Loubyansky wrote:
>> 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
>>
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development