From: Goldsack, P. <pat...@hp...> - 2013-08-13 12:47:48
|
Danos, TBD won't work - that will throw an error when you parse as TBD means that this has to be replaced in the usage (by extension). At what point to you know the value of the IP address? I assume that you do not know it at time of creating the specification since otherwise you would include it. So you have a number of options: 1) If you know it when you start the daemon (for example the IP address of the local host), you could pass it as a java property and set the "ip" attribute to a "PROPERTY" value (see the documentation for details). This can be done in a start-up script on the command line that starts the daemon, in a properties file (I forget the name, but it is in the documentation), or programmatically by setting the java property in the code before processing the .sf file. You can do the same with environmental variables using ENVPROPERTY 2) If you know it at the time you parse the .sf file, you could set it in you code after the parse, and before the resolution phases. This is not possible if you are simply using the standard start script which do not have the opportunity to interject code in between the parse and phase resolutions. 3) One of the components that gets started as part of the deployment posts the value it obtains to the ip attribute, and all other components obtain it by derefencing attributes that are LAZY links to that posted attribute. 4) write yourself a smartfrog function that obtains the IP address in whatever way required, and make the attribute a function invocation If none of these help, give more details of exactly what you need to do and I will come up with some other options! Patrick -----Original Message----- From: met...@cs... [mailto:met...@cs...] Sent: 13 August 2013 12:00 To: sma...@li... Subject: [Smartfrog-users] TBD_ip_address Hello to all, Is there a way to define an IP on runtime? I though the usage of defining an attribute like ip TBA; But how am i going to resolve it then? thanks, danos ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Smartfrog-users mailing list Sma...@li... https://lists.sourceforge.net/lists/listinfo/smartfrog-users |