our platform is this: jboss 4.0.0, w/ tomcatservlet container. we're not using the ejb container at all. our web apps declare and use a java.net.URL resource-ref in their web.xml. they use these urls for various work.
i'd like to configure the value of these urls outside of my .war/ear application, but currently the only thing i can see is to define the value in the jboss-web.xml that is packaged w/ my application.
is there a way to configure java.net.URL resource ref values w/ tomcat/jboss-4.0.0 outside of jboss-web.xml?
In my understanding it's certain J2EE web application packaging design flaw. You can't do post deploy tuning, unless you use something J2EE app container specific. If somebody knows a generic solution plese share with us. Currently I package .war using information about target system, like URL where I'm going to store user's generated resources. It would be nice to have one .war for any system, when a user can do post tuning just using web UI provided by my app.
it really seems to me to be more a hack than a solution. this type of thing is something you expect the container to provide. providing runtime configuration for an application outside of the app itself. clearly the j2ee specification is lacking in this respect.
i'd imagine that env-entries are essentially the same in jboss (though we're not using them yet) in that they're defined in jboss-web.xml right along with the war. what if you want a test deployment to have env-entry of 10% discount, and prod to have 12.5% discount?
i've also read that w/ tomcat you can provide your own resource manager to provide stuff into jndi, but haven't seen an example yet on that.
i think a workable solution may be to have a mbean that reads from an xml configuration file stuff to put into jndi, then based on a parameter will choose from a group of potential values to use. the xml file can have DEV, TEST1, TESTT2, PROD groupings of values.