Re: Managing components deployed onseveralhosts

"Goldsack, Patrick" <[email protected]> Thu, 27 Jul 2006 01:34:26 +0100
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <[email protected]>
Throwing an exception in sfReplaceAtrribute (and similar) won't
terminate the component.

Patrick 

-----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.
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.
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.
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