@Romain. DeltaSpikes ConfigResolver does _not_ depend on CDI. In fact it is 
used _by_ CDI to bootstrap - but not the other way around. 

Just use ConfigResolver.getPropertyValues() instead of @Inject @ConfigProperty 
and you are done.

TomEEs system.properties really only works on TomEE and we should not suggest 
this to users who want to build portable applications. They will stay with 
TomEE anyway as it is almost twice as fast as the 2nd fastest container ;)

LieGrue,
strub


> Am 05.04.2015 um 09:57 schrieb Romain Manni-Bucau <[email protected]>:
> 
> @Mark: conf/system.properties is intended to be used by any
> System.getProperty user
> 
> It is the fastest way to get a conf without worrying about cdi. Depending
> the app cdi can be an issue (binding primitives etc)
> Le 5 avr. 2015 09:55, "Mark Struberg" <[email protected]> a écrit :
> 
>> Hi Brandon!
>> 
>> TomEE’s conf/system.properties are _not_ intended for end users.
>> 
>> If you like to configure something in your own project then please take a
>> look at the DeltaSpike configuration system [1].
>> The basic idea is to have different ‚ConfigSources‘ (some property files,
>> environment, -D java params, etc) which each have their own ‚ordinal‘. The
>> higher the ordinal value, the more important it’s configured values. That
>> way you can provide a default configuration within some jar, override it
>> later in your WAR or even use a totally different value on each of your
>> servers.
>> 
>> LieGrue,
>> strub
>> 
>> [1] http://deltaspike.apache.org/documentation/configuration.html
>> 
>> 
>>> Am 05.04.2015 um 08:52 schrieb brandonlamb <[email protected]>:
>>> 
>>> Wow, so ~1.5 hours, finally stumbled upon System.getProperty().
>>> 
>>> Putting a system.properties into src/main/tomee/conf did the trick, I was
>>> able to fetch my setting.
>>> 
>>> Now it would still be nice to figure out how to load some other separate
>>> config file, but I will settle for this for now.
>>> 
>>> :)
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>> http://tomee-openejb.979440.n4.nabble.com/Total-noob-question-system-properties-tp4674263p4674266.html
>>> Sent from the TomEE Users mailing list archive at Nabble.com.
>> 
>> 

Reply via email to