Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 09-25-2006
stephan stephan is offline
Registered User
 
Name: Stephan Stapel
Organization: Stephan Stapel
Project: BristolNG
 
Join Date: Oct 2003
Location: Essen, Germany
Posts: 169
Using environment variables with config.txt

Hi!

Running a particular Ice application on multiple hosts, we came across the question whether it is possible to include environment variables or such in Ice's configuration file, like:

IceBox.ServiceManager.Endpoints=tcp -h %MYHOST% -p 9995

If not, do you have a suggestion on how to flexibly set up config files for different environments?

Best regards,

Stephan
__________________
Stephan Stapel
Software Architect
Author of 'Verteilte Internet-Anwendungen mit Ice', ix 07/2005
Author of 'Webbasierte Anwendungen mit IcePHP', ix, 06/2006
Reply With Quote
  #2 (permalink)  
Old 09-25-2006
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 931
No, the config file parser doesn't look at environment variables. Changing this wouldn't be all that easy, in particular for Java 1.4, which can't get at the environment at all.

I can see two options for you to do what you want:

- Use IceGrid deployment descriptors, which allow you to substitute certain variables (but not arbitrary user-defined variables). This may be just enough for what you need.

- Use a preprocessor such as Perl or sed to substitute the values into the config file.

Cheers,

Michi.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment variables for java IceBoxin IceGrid Sameerrele Help Center 4 10-10-2006 06:24 PM
How can i config the icephp develop environment? meizhe Help Center 2 06-12-2006 06:31 AM
set config properties w/o config file dkey Help Center 3 05-08-2005 06:27 AM
Use of variables in config files xdm Help Center 1 03-24-2005 07:15 PM
how to config the environment in VC .NET 2003 fw_csha Help Center 5 09-27-2004 11:38 AM


All times are GMT -4. The time now is 11:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.