RE: DEPLOYMENT
"Guijarro, Julio" <[email protected]>
| Newsgroups | gmane.comp.java.smartfrog.devel |
|---|---|
| Message-ID | <8D5B24B83C6A2E4B9E7EE5FA82627DC9A43D50@sdcexcea01.emea.cpqcorp.net> |
Hi Rana,
When you deploy a Component description you can deploy a new Application or a new Child. When deploying a new Application, the parent parameter is null.
Now, to deploy a new Application you can use directly the method:
---
sfCreateNewApp (String name, ComponentDescription cmp,Context parms)
Parameters:
name - name for the new application
cmp - compiled component to deploy and start
parms - parameters for description
---
When using this method you only need to pass a NAME and a valid COMPONENTDescription. "parms" will be null most of the time.
Please, just to understand how the method works, try to deploy a very simple component description with a standard component like Prim or Compound.
To do this you could for example do:
---
ComponentDescription cd;
cd = ComponentDescription.sfComponentDescription("/org/smartfrog/examples/pong/singlePlayer.sf");
//Inside a Compound
this.sfCreateNewApp("testingPong",cd,null);
---
I have the suspicion that the null pointer is being thrown inside your new component and not in the create/deploy methods. Have you tested your component using a normal description?
Please, if this does not work for you, could you send a short example that we could comment on?
Julio Guijarro
> -----Original Message-----
> From: smartfrog-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:smartfrog-
> developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Sabharwal, Ritu (STSD)
> Sent: 29 April 2005 12:57
> To: rana dabbu
> Cc: smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: Re: [Smartfrog-developer] DEPLOYMENT
>
> Hello Rana,
>
> As I mentioned in my earlier mail, the parent parameter has to be some
> compound component (itself or some other compound) or some
> processcompound (local or remote rootProcess). In each case, call
> sfDeployComponentDescription() with the appropriate component as parent
> paremeter from sfStart(). Parent parameter points to the component/host
> where you want this component to get deployed so it cannot be null.
>
> Also, as Julio mentioned please check the similar thread in the lists
> archive:
>
> http://news.gmane.org/gmane.comp.java.smartfrog.user/cutoff=72
>
> Title: "Component Deployment."
>
> Thanks,
> Ritu.
>
> rana dabbu wrote:
>
> >hello ,
> >
> > As per instructions I have tried the following
> >- i have a class extending Compound and used both sfCreateNewApp and
> >sfDeployComponent description( by setting parent to NULL and context
> >obtained by the sfContext() on my description).
> >I am getting Nullpointer and Deployment exception.
> >
> >regards,
> >Rana
> >
> >
> >-------------------------------------------------------
> >SF.Net email is sponsored by: Tell us your software development plans!
> >Take this survey and enter to win a one-year sub to SourceForge.net
> >Plus IDC's 2005 look-ahead and a copy of this survey
> >Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix
> >_______________________________________________
> >Smartfrog-developer mailing list
> >Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> >https://lists.sourceforge.net/lists/listinfo/smartfrog-developer
> >
> >
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Tell us your software development plans!
> Take this survey and enter to win a one-year sub to SourceForge.net
> Plus IDC's 2005 look-ahead and a copy of this survey
> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> _______________________________________________
> Smartfrog-developer mailing list
> Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/smartfrog-developer
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix