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

Ales Justin ales.justin at gmail.com
Thu Apr 19 11:55:57 EDT 2012


This is a JBossAS7 *dev* ml, not user ml. ;-)
Ask such questions on the forum; e.g. Weld forum.

On Apr 19, 2012, at 5:49 PM, gross wrote:

> 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
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20120419/52b9c894/attachment-0001.html 


More information about the jboss-as7-dev mailing list