Re: Managing components deployed onseveralhosts
"Guijarro, Julio" <[email protected]> Wed, 26 Jul 2006 16:03:44 +0100
| Newsgroups | gmane.comp.java.smartfrog.devel |
|---|---|
| Message-ID | <[email protected]> |
> -----Original Message----- > From: smartfrog-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:smartfrog- > developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Olivier Pernet > Sent: 26 July 2006 10:45 > To: Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > Subject: Re: [Smartfrog-developer] Managing components deployed > onseveralhosts > > On 7/25/06, Guijarro, Julio <[email protected]> wrote: > [...] > > > I'm trying to implement that right now, and the Javadoc doesn't make > > > it very clear what you should do to reject an update. > > Again it depends of the semantics of your component. You don't need to > > throw any exception if you don't want to. > > > [...] > > > > It depends on what you are trying to do. Most of the sfAddAttribute() > > calls are just to add extra info to the runtime but it you throw an > > exception then the components will probably terminate. You should only > > check/filter for your particular cases, the others should be passed to > > super.... > > Sure. What I really want is to reject some changes (that is, make some > attributes read-only), and be able to reject changes based on values > too. The normal operation is that you throw the exception. > So I definitely don't want the component to be terminated. But still I > need to reject changes, and I'd like the user to be notified of that. The exception will be the notification to the user. You will only do it for your special attributes. > Otherwise, the user will end up changing a value in the management > console, see nothing changing, and scratch his head. :-) > > So, if throwing an exception terminates the component, I need something > else. That depends on how you treat the exception. The exception will be received in the component or method that calls it. If the component itself calls that method and fails then it could be that it terminates but if you, for example, use the management console to modify an attribute, then the component will not terminate and the console will receive the exception. > Bu, just not calling super.sfReplaceAttribute() and returning the old > value would not notify the user of the problem. > Any other way ? > > Cheers, > -- > Olivier Pernet > Summer Student - CERN Openlab > > We are the knights who say > echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc > > ------------------------------------------------------------------------ - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE V > _______________________________________________ > Smartfrog-developer mailing list > Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/smartfrog-developer ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV