Re: component deployment
Flávio Roberto Santos / Projeto Ourgrid <flaviors-y04Q/[email protected]>
| Newsgroups | gmane.comp.java.smartfrog.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Patrick, I have needed something like this: I used the command sfCreateNewChild() to deploy two different components, but I've got some problems to list them. I tried sfChildren() but all the returned components were the same. In other words, the components were with the same attribute values although they've been deployed with different ones. What is happening? If you need, I can send the code to you. Thanks in advance. Flávio Roberto. Goldsack, Patrick wrote: >I presume that you have a ComponentDescriptionImpl instance already >parsed - either by parsing the text (from a string, a file or some input >stream) or by picking up a "LAZY extends" attribute. > >The right model will depend on whether you want the component parented >or not, and by what, and which phase of the lifecycle this parent is in. > >Andreas, > >I will cover a number of possibilities for your current situation: > >1) you are to be the parent, and you are a compound, call the method >sfCreateNewChild(...) on yourself. You can do this as you are in >sfStart, but only after the super call. Had you been in sfDeploy(), you >would have to only partially step through the lifecycle and use the more >basic methods. > >2) you are not the parent but some other compound is - it depends on >whether you where you want this component deployed (near you, near the >parent, or elsewhere). If the location is near the compound - call the >sfCreateNewChild() on that compound passing the >ComponentDescriptionImpl. If the location is not near that compound, >find the process compound of the location (do an sfResolve in the link >"HOST hostame"), and call sfCreateNewChild( ) passing the required >compound as a parent parameter. This will be OK if the parent has been >fully through its lifecycle. > >3) If you want no parent - do as (2) to locate the right process >compound, and use sfCreateNewApp(...). > >In 2 and 3, if the location attributes are set in the component >description, you can always use the local process compound to deploy the >component in the right place. > >Patrick > >-----Original Message----- >From: smartfrog-support-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >[mailto:smartfrog-support-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of >Andreas Unterkircher >Sent: 16 March 2005 13:41 >To: smartfrog-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >Subject: [Smartfrog-support] component deployment > > >Hello, > >I have a component which should deploy another component if some >condition is met within the sfStart method. What is the right way to do >that in Java ? E.g. I was thinking of something like > >newComponent = new newComponentImpl(); >newComponentImpl.sfDeploy(); >newComponentImpl.sfStart(); > >but I guess this is not right... Do I have to use PrimDeployerImpl ? > >Thanks, >Andreas > >-- >Andreas Unterkircher >IT Department >CERN >CH-1211 Geneva 23 >http://cern.ch/openlab > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Smartfrog-support mailing list >Smartfrog-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >https://lists.sourceforge.net/lists/listinfo/smartfrog-support > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_ide95&alloc_id396&op=click >_______________________________________________ >Smartfrog-support mailing list >Smartfrog-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >https://lists.sourceforge.net/lists/listinfo/smartfrog-support > > > -- Flavio Roberto Santos Undergraduate Student in Universidade Federal de Campina Grande OurGrid Team Member - www.ourgrid.org Webpage - http://www.dsc.ufcg.edu.br/~flaviors -- "As far as the laws of mathematics refer to reality, they are not certain, and as far as they are certain, they do not refer to reality." -- Albert Einstein ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click