"£ukasz £apiñski" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello,
>
> I am not really sure where to start. Whether it should be a dns
> modification or virtual hosts in tomcat?
>
> I am doing a web portal that a user after registration would have its own
> domain, such as:
>
> max.foo.com
> jarek.foo.com
>
> at my server foo.com.
>
> How to add programmatically, without restarting the server such domains.
>

Obviously DNS has to be handled no matter what you do.  The rest depends on 
how you are deploying the resulting sites.  If they can be deployed all 
under one (the Engine's default) <Host />, then you can probably get away 
with a Filter that plays traffic cop and forwards requests to the correct 
web-app based on the Host header.  Otherwise, you would probably need to use 
JMX to dynamically add a new <Host /> and persist it to server.xml (with 
appropriate syncs).  In the second case, it may even be worth looking into 
an Embedded TC, so you don't have to store the <Host /> info in server.xml.

> I have been reading around but no good solution have I found. Could you
> recommend me some libraries, tools or techniques?
>
> Would it be more difficult when I start to use load balancing
> functionality of Tomcat?
>

Short answer: likely.  You need some form of file-replecation whatever you 
do.  If you can use the defaultHost method, then the Filter needs some way 
to update it's list of installed hosts.  If you go the JMX route, then you 
need a notification method (for a small cluster, raw JMX might work, for a 
large cluster, you probably need to write some kind of multi-castor 
notification).

>
> -- 
> Kind regards,
> £ukasz £apiñski
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to