Yes, look at SimpleTcpCluster
private String getManagerName(String name, Manager manager) {
String clusterName = name ;
if(getContainer() instanceof Engine) {
Container context = manager.getContainer() ;
if(context != null && context instanceof Context) {
Container host = ((Context)context).getParent();
if(host != null && host instanceof Host)
clusterName = host.getName() + name ;
}
}
return clusterName;
}
we concatenate host name with context path :-)
Peter
Am 04.03.2006 um 15:59 schrieb Filip Hanik - Dev Lists:
if you have an engine cluster and two webapps with the same name,
one in each host, how does it know which one it is?
Filip
Peter Rossbach wrote:
Yes, you must use different domains, but you can also used an
engine level cluster module,
<Engine ...>
<Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" />
<Host name="test1.example.com" appBase="webapps" autoDeploy="false" >
<Context docBase="/home/ronald/tmp/HEAD/crm/web" path="" />
</Host>
<Host name="test2.example.com" appBase="webapps" autoDeploy="false" >
...
</Host>
</Engine>
regards
Peter
Am 02.03.2006 um 17:38 schrieb Filip Hanik - Dev Lists:
I'm gonna let Peter Rossbach give you the final answer since he
developed the "simple"config concept.
My guess is yes, if your hosts have webapps with the same names,
they will most likely get mixed up.
my suggestion to try would be
<Host name="test1.example.com" appBase="webapps"
autoDeploy="false" >
<Context docBase="/home/ronald/tmp/HEAD/crm/web" path="" />
<Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
service.domain="vhost1"/>
</Host>
<Host name="test2.example.com" appBase="webapps"
autoDeploy="false" >
<Context docBase="/home/ronald/tmp/VERSIE_2_1/crm/web" path="" />
<Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
service.domain="vhost2"/>
</Host>
and that should stop the data from flowing between vhosts
Filip
Ronald Klop wrote:
Hello,
I have this in my server.xml.
<Host name="test1.example.com" appBase="webapps"
autoDeploy="false" >
<Context docBase="/home/ronald/tmp/HEAD/crm/web" path="" />
<Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"/>
</Host>
<Host name="test2.example.com" appBase="webapps"
autoDeploy="false" >
<Context docBase="/home/ronald/tmp/VERSIE_2_1/crm/web"
path="" />
<Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"/>
</Host>
This seems to work. The sessions aren't mixed up between de
hosts. Is this supported behaviour? Or is there a change the
sessions wil mix up?
Ronald.
--------------------------------------------------------------------
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]