Re: Updating an attribute !
Steve Loughran <[email protected]> Thu, 05 Oct 2006 16:35:21 +0100
| Newsgroups | gmane.comp.java.smartfrog.user |
|---|---|
| Message-ID | <[email protected]> |
Omer Khalid wrote: > 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". you can certainly do that, though there is no way to force components to reread their values. some components (e.g. assert) do this on sfPing(), so you can change state dynamically and have it rechecked. In SVN trunk there is some update support that is designed to support dynamic updates more rigorousoly. > > 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! yes, you can reread the value, with the caveat that you may incur RPC overheads again. And you dont want to try and read anything during termination. Everything you need then should be cached in advance, or you have to catch request failures and skip those bits. -steve ------------------------------------------------------------------------- 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