Hi,
I'm trying to launch multiple virtual hosts dynamically from a database in JBoss. When my application starts, a method is called that iterates through a database table of hosts. For each row of the table I would like to launch a new host using JBoss's MBeans support.

I'm pretty sure that this should be fairly straight forward as I've done something similar with stand alone Tomcat by passing the "createStandardHost" and "
createStandardContext" operations to the MBeanServer.

My problem is that I need to initialize each host/context with a JNDI variable so that it knows which host it is (in order to access the correct database etc.). But each context's JNDI IntialContext becomes read only once the context is created. Does anyone know of a way of getting a JNDI variable into each context using MBeans? Or is there a better way of solving this problem?

Thanks,

Steve