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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev