Hello.
I want to read some configuration from file in my web app. And inject data
from it to some managed beans. Now I use producer with hard-coded file name
to do so.
To deploy two such WARs on one server I want to pass this configuration
file name in runtime. I'he tried:
- JNDI -- no usual context before end of deployment (in CDI Extension,
post construct methos),
- Servlet Listener -- it starts after all CDI injections passed,
- Seam @ContextPath annotation -- it uses servlet listener.
How can I resolve WAR file name or context path in CDI to use it in
producer? Or can I somehow pass string parameter (depending on concreet
deployment) to CDI Producer without changing war?
--
Best regards,
Konstantin Gribov aka gross