Hi Thomas!

This sounds like a bug in ConfigResolver.
We should walk up the parent ClassLoader chain like we do in 
BeanManagerProvider.

Please create a JIRA issue for it.

LieGrue,
strub




>________________________________
> From: Stemmer Thomas <thomas.stem...@cellent.at>
>To: "dev@deltaspike.apache.org" <dev@deltaspike.apache.org> 
>Sent: Tuesday, 26 November 2013, 15:27
>Subject: Using @ConfigProperty in an EAR File on JBoss 7 fails
> 
>
>
> 
>Hello,
>
>I'm using @ConfigProperty for loading properties from a propertyfile. This 
>works fine as long as I deploy the application as an WAR File. If a wrap the 
>WAR in an EAR File the Properties won't get loaded.
>
>We are using JBoss EAP 6.1.1 (JBoss AS 7.2.1). As far as I can see from 
>debugging the following happens:
>- The properties are loaded on EAR Startup with the EAR Classloader
>- The properties are put in the 
>org.apache.deltaspike.core.api.config.ConfigResolver.configSources HashMap, 
>the key is the EAR Classloader
>- The properties are accessed in the WAR File, so the WAR Classloader is used
>- The ...ConfigResolver.getConfigSources() uses the WAR Classloader as a key 
>for the HashMap
>- No properties are found because of the wrong key (WAR instead of EAR 
>Classloader)
>
>Any ideas how to get this working? I could build a small sample if that's 
>help, but that's pretty much it.
>
>Thanks,
>regards, Thomas
>
>
>Ing.Thomas Stemmer 
>Solution Architect
>Software Development Java
>cellent AG 
>...more than just IT
>Lassallestraße 7b 
>A-1020 Wien  
>Tel:   +43 (1) 532 78 03-0  
>Fax:  +43 (1) 532 78 03-33  
>Mobil:  +43 (676) 841 785-500  
>thomas.stem...@cellent.at 
>www.cellent.at   
>Firmensitz Wien - Handelsgericht Wien - FN 208229w 
>Diese EMail sowie etwaige Anlagen sind ausschliesslich fuer den Adressaten 
>bestimmt und koennen vertrauliche oder gesetzlich geschuetzte Informationen 
>enthalten. Wenn Sie nicht der bestimmungsgemaesse Empfaenger sind, 
>unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Anderen als 
>dem bestimmungsgemaessen Adressaten ist es untersagt, diese EMail zu 
>speichern, weiterzuleiten oder ihren Inhalt, auf welche Weise auch immer, zu 
>verwenden. Wir verwenden aktuelle Virenschutzprogramme. Fuer Schaeden, die dem 
>Empfaenger gleichwohl durch von uns zugesandte, mit Viren befallene EMails 
>entstehen, schliessen wir jede Haftung aus. 
>
>The information contained in this e-mail or attachments is intended only for 
>its addressee and may contain confidential and/or privileged information. If 
>you have received this e-mail in error, please notify the sender and delete 
>the e-mail. If you are not
 the intended recipient, you are hereby notified, that saving, distribution or 
use of the content of this e-mail in any way is prohibited. We use updated 
virus protection software. We do not accept any responsibility for damages 
caused anyhow by viruses transmitted
 via e-mail. 
>
>
>

Reply via email to