Re: Updating an attribute !

"Goldsack, Patrick" <[email protected]> Thu, 5 Oct 2006 16:23:07 +0100
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
 
Omer
 
There are two ways to handle an update to an attribute, and I think (if
I understood correctly) that you mentioned them both in your email:
 
1) to re-read just before the value needs to be used and not to cache it
in an variable, or at least to re-read on a sufficiently frequent basis
in a thread, say, and update the cached variable
 
2) to overwrite the sfReplaceAttribute method not only call the "super"
method, but also to look at the attribute to decide if some special
action needs to be taken - such as update a variable, or start a thread
to carry out some action, and so on.
 
Patrick
 
________________________________

From: smartfrog-support-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:smartfrog-support-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
Omer Khalid
Sent: 04 October 2006 15:12
To: Smartfrog Support
Subject: [Smartfrog-support] Updating an attribute !


Hi,

I am wondering is it possible to update an attribute for an already
deployed component e.g. lets suppose in the component configuration I
have an attribute named "save" which is set to "false". 

During the deployment process of component its being resolved, and the
value "false" is set to a local variable with in that component.

Then at later stage, if a user wants to update attribute "save" using
the managementConsole, and set its to "true". 

Would following be the right approach to read the new value by simply
resolving the attributing again in a certain function to use the later
"save" value or the sfReplaceAttribute have to be called rather than
resolving the attibute! 

Regards

Omer

-- 
---------------------------------------------------------------
 

CERN - European Organization for Nuclear Research 
Information Technology Department
CH-1211 Geneva 23 

Phone: +41 (0) 22 767 7996
Fax:     +41 (0) 22 767 4900
E-mail : [email protected]

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

_______________________________________________
Smartfrog-support mailing list
Smartfrog-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/smartfrog-support