logo       

Re: [enhydra] Loading multiple Config files: msg#00012

java.enhydra.general

Subject: Re: [enhydra] Loading multiple Config files

Hi Rafael,

Config object, in Enhydra 6.x, is initialized trough JNDI parameters.
'ConfigFile' (or 'XMLConfigFile') are reading just context JNDI parameters (placed in descriptor files - web.xml and context.xml) and specific JNDI resource named "configuration/ConfConfigurationFactory" (which is recognized as application configuration file).

There is a question of using multiple 'Config' objects inside of one enhydra application!?

To make long story short, we have left (for back compatibility reasons) way to do this!
Instead ConfigFile(File) constructor just use ConfigFile(FileInputStream).

your sample code:
Config genericConfig = new ConfigFile(new FileInputStream(configFileLocation)).getConfig();

Note that if this 'Config' object is used for DODS (DatabaseManager) initialization you are strongly recommended not to use 'DataSource' connection definition (this feature is supported in newest DODS that will be included in upcoming Enhydra 6.5-1).

Hope this works for you!

Regards,
Slobodan Vujasinovic
Enhydra Development Team


Rafael Torres wrote:

Hi,

I'm using Enhydra 6.4.1 and I'm tryiubg to load multiple Config files.

The JAVA code that I use is:
Config genericConfig = new ConfigFile(new File(configFileLocation)).getConfig();

For the first iteration it works OK.
But in the next interations (with diferent configFileLocation), the Config returned is the the first iteration made.

Am I using the rigth aproach? Can anyone help me?

Thanks,
Rafael Torres


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


--
You receive this message as a subscriber of the enhydra@xxxxxxxxxxxxx mailing
list.
To unsubscribe: mailto:enhydra-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the enhydra@xxxxxxxxxxxxx mailing
list.
To unsubscribe: mailto:enhydra-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise