Re: Managing components deployed on severalhosts

"Olivier Pernet" <[email protected]> Wed, 26 Jul 2006 11:44:55 +0200
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <[email protected]>
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=DEVDEV