-
1. Re: Programmatic configuration of jvmRoute
starksm64 Oct 25, 2007 2:18 PM (in response to brian.stansberry)It needs to be part of the container metadata as in general this should be coming from some server/clustered configuration potentially set by the admin tools. A tomcat deployer specific setting is just an override to a higher level server setting.
In general we need to forget that xml exists, and define a metadata model that encapsulates all externalized behavior, and then map the sources of that information onto the metadata model. The tomcat deployer is a long way from correctly using such a model due to its internal parsing of its own descriptors like server.xml, conf/web.xml, etc. Its a todo to have jbossweb completely driven by the web container metadata model. -
2. Re: Programmatic configuration of jvmRoute
brian.stansberry Oct 25, 2007 3:13 PM (in response to brian.stansberry)OK, with that approach presumably you could have some logic somewhere that says "if my metadata says I'm using JK, then check for jvmRoute metadata" which defaults to the overall server id.
Is having jbossweb completely driven by web container metadata something you're thinking about for AS 5.0.0? If not, then my original question about whether it's OK to add a std jvmRoute attribute to server.xml still stands. -
3. Re: Programmatic configuration of jvmRoute
brian.stansberry Oct 25, 2007 3:23 PM (in response to brian.stansberry)This leads into the general topic of what the use cases are for identifying a server and what type of metadata could satisfy each use case; goal being to see if we can have a single value per node, or no value at all. I opened a thread on this a while ago but got no response. Scott/Tim, etc., any inputs you have on http://www.jboss.com/index.html?module=bb&op=viewtopic&t=108609 would be appreciated. Tim Fox is thinking about approaches that would avoid having an externalized node id, but if we need to have one anyway for other use cases, maybe he doesn't need to bother.
-
4. Re: Programmatic configuration of jvmRoute
starksm64 Oct 25, 2007 3:31 PM (in response to brian.stansberry)"bstansberry@jboss.com" wrote:
OK, with that approach presumably you could have some logic somewhere that says "if my metadata says I'm using JK, then check for jvmRoute metadata" which defaults to the overall server id.
Is having jbossweb completely driven by web container metadata something you're thinking about for AS 5.0.0? If not, then my original question about whether it's OK to add a std jvmRoute attribute to server.xml still stands.
No, it won't be completely rewritten by that timeframe. Its ok to refer to a system property for now. In the future there should be a jvmRoute setting that could default to the system property if not set. This ultimately would be a lookup against the metadata repository to see if had been mapped onto another value, coming from deployment metadata, annotations, system property, server settings, etc. -
5. Re: Programmatic configuration of jvmRoute
jfclere Oct 26, 2007 4:22 AM (in response to brian.stansberry)Don't forget that we have actually no ways to forward this information to mod_jk/mod_proxy so changing the jvmRoute programmaticaly requires complex modifications there too.
-
6. Re: Programmatic configuration of jvmRoute
brian.stansberry Oct 26, 2007 10:41 AM (in response to brian.stansberry)If it were changed programatically (which, given the earlier part of the thread, is very probably not necessary) it would just be as part of the startup sequence of JBossWeb, before the AJP connector is even started. E.g.
TomcatDeployer does what it does now which results in parsing server.xml, Engine object being created.
Added step: TomcatDeployer sees it's configured with useJK=true, sees Engine.getJvmRoute() == null, so it creates a jvmRoute value based on the global server Id and calls Engine.setJvmRoute().
Existing process continues: TomcatDeployer.startConnectors() gets called when the signal comes in that the overall AS start is done.
Previously unstated: the user would of course have to know how JBossWeb is going to convert the server Id into a jvmRoute, and use the correct worker name in workers.properties. -
7. Re: Programmatic configuration of jvmRoute
rmaucher Oct 26, 2007 12:26 PM (in response to brian.stansberry)I see you're thinking about this from your own perspective, but based on the multitude of AJP connectors we support, it is simply not going to be possible to set the value of jvmRoute dynamically, and that's not going to change. I suggest to simply give up on the whole idea: the value of the jvmRoute attribute must remain static.
-
8. Re: Programmatic configuration of jvmRoute
brian.stansberry Oct 26, 2007 12:39 PM (in response to brian.stansberry)OK; that's why I asked. :-)
Do you see any significant issue with making something like this the default in server.xml?<Engine name="jboss.web" defaultHost="localhost" jvmRoute="n${server.peer.id:0}">
Assumption here is that JBM's needs force us to set server.peer.id to some integer value.
Downside I see is just a minor performance hit of needlessly adding ".n0" to session ids when JK isn't used. Anything worse?