Placeholders are a real feature so ko worry on them. Not sure what you mean by cdi config source but microprofile is not tomee mainstream (they still breaks api between each versions) and cdi hapoens way too late for the container (tomee and cdi extension) but an app using only injection you can do it using CDI utility class.
Le ven. 23 nov. 2018 03:23, Shultz, Dmitry <dmitry_shu...@kaltire.com> a écrit : > To complete the for example (somehow typed it in my brain instead of the > form:) > > It looks like it will solve some problems by reading directly from the > configmap (cdi custom config source would be awesome) instead of relying > on some yaml. > > Cheers, > Dmitry > ________________________________ > From: Shultz, Dmitry <dmitry_shu...@kaltire.com> > Sent: 22 November 2018 17:03:36 > To: users@tomee.apache.org > Subject: RE: TomEE Maven Plugin: Can conf/system.properties be > externalized? > > Thanks Romain, this is pretty cool functionality I can see the potential > (for example ). > > Just for the sake of completeness ('also' follows after 'yes':), is it > still Ok to use env variables in ${}? > > Cheers, > Dmitry > > > -----Original Message----- > From: Romain Manni-Bucau [mailto:rmannibu...@gmail.com] > Sent: Thursday, November 22, 2018 11:01 AM > To: users@tomee.apache.org > Subject: Re: TomEE Maven Plugin: Can conf/system.properties be > externalized? > > You also have propertiesproviders and configurers for resources: > > https://github.com/apache/tomee/blob/8547f730b7c9fc085534a8f5d1f68340154d2cfe/container/openejb-core/src/main/java/org/apache/openejb/resource/heroku/HerokuDatabasePropertiesProvider.java > and > > https://github.com/apache/tomee/blob/8547f730b7c9fc085534a8f5d1f68340154d2cfe/container/openejb-core/src/test/java/org/apache/openejb/resource/heroku/HerokuDatabasePropertiesProviderResourceTest.java > for an example of usage > > Le jeu. 22 nov. 2018 19:25, Shultz, Dmitry <dmitry_shu...@kaltire.com> a > écrit : > > > Hi guys, > > > > I'm looking at the same thing but from perspective to run TomEE image > > in the K8's cluster. > > The ${} replacement looks promising, especially when I found this > > thread > > http://tomee-openejb.979440.n4.nabble.com/how-con-figure-the-datasourc > > e-into-tomee-xml-using-docker-td4682533.html > > where Romain shared that it is possible to use env variables (not JVM > > properties) for substitution. From what I can see it is the most > > straightforward way to consume datasource configuration from K8's > > config map (by exposing config map values as env variables to the pod). > > > > Unfortunately, I can't find any other documentation for this > > functionality and it makes me worry if it's not officially supported > > and may be removed in the future versions. Please clarify. > > > > Also, if there is any other way to consume config map key/values in > > tomee.xml please let me know. > > > > Cheers, > > Dmitry > > > > > > -----Original Message----- > > From: Roberto Cortez [mailto:radcor...@yahoo.com.INVALID] > > Sent: Thursday, November 22, 2018 4:01 AM > > To: users@tomee.apache.org > > Subject: Re: TomEE Maven Plugin: Can conf/system.properties be > > externalized? > > > > I guess you want to hide user, password, connection, schema etc. > > > > You could use variable replacement with ${} and pack the file in the > > jar and then just set the properties to replace like Romain mentioned. > > I think it should work, > > > > Cheers, > > Roberto > > > > > On 22 Nov 2018, at 05:42, Romain Manni-Bucau <rmannibu...@gmail.com> > > wrote: > > > > > > Hello, > > > > > > You can always load system properties in setenv.sh before the server > > starts. > > > > > > If it is properties settable after tomee.xml is read you can set > > > them in it and it supports <Import path=.... /> > > > > > > Finally you can always plug a tomcat listener before tomee one and > > > set the system properties the way you want peogrammatically. > > > > > > Le mer. 21 nov. 2018 23:51, exabrial12 <exabr...@gmail.com> a écrit : > > > > > >> We want to store the configuration for our datasources separate > > >> from the distribution of the one-jar. If you haven't seen Jonathan > > >> [Gallimore's] excellent blog post on configuration TomEE, see here: > > >> https://www.tomitribe.com/blog/tomee-configuration-techniques/ > > >> > > >> Looking at the TomEE plugin's options though, it allows you to > > >> include a system.properties at build time, but I can't seem to find > > >> a way to set it at runtime. > > >> > > >> Any ideas or alternatives? > > >> > > >> > > >> > > >> -- > > >> Sent from: > > >> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html > > >> > > > > >