Re: [enhydra] Loading multiple Config files

Slobodan Vujasinovic <[email protected]> Thu, 14 Jul 2005 09:46:02 +0200
Newsgroups gmane.comp.java.enhydra.general
Message-ID <[email protected]>
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 [email protected] mailing list.
>To unsubscribe: mailto:[email protected]
>For general help: mailto:[email protected]?subject=help
>ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  
>
message-footer.txt (text/plain, 275 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws