[jboss-as7-dev] Injection WAR file name or context path to use it in CDI Producer

gross grossws at gmail.com
Thu Apr 19 11:49:37 EDT 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20120419/ee23b7a8/attachment.html 


More information about the jboss-as7-dev mailing list