[OFBiz] Users - [OFBiz] User - Multiple Stores and Websites in a single instance
mpf at zentric.com
mpf at zentric.com
Thu Aug 19 03:33:00 EDT 2004
Since there where now answers in the dev-list. I cross post it. Please
apologize.
....
Hello, anybody with a similar scenario?
We run with TOMCAT configured and have one product portfolio that should
be represented in different layouts on different websites. This works
perfect with categories -> catalogs -> store mapping. But then we want it
as
__MultiStores and a single instance__
* www.mysite1.de reaches websiteid 1 that has store1 with catalog 1
* www.mysite2.de reaches websiteid 2 that has store2 with catalog 2
* www.mysite3.de reaches websiteid 3 that has store3 with catalog 2
.....
This is almost similar to the scenario described in the wiki at
http://ofbizwiki.go-integral.com/Wiki.jsp?page=SSSMultiStores1
except that we want it mounted at "/" for all stores !!!!
mount-point="/" in web.xml
If we do it as described with SSSMultiStores1 there is the following
error, becauses multiple webapps want to use this mount-point.
>java.lang.IllegalArgumentException: addChild: Child name '/' is not
unique
The question is how to avoid it with TOMCAT!?
Approache 1
Maybe some tweak with Apache/AJP is a solution???
There is somethin documented at
http://ofbizwiki.go-integral.com/Wiki.jsp?page=SSSMultiInstances
but it has the drawback that it needs a ofbiz instance for each
store/website
Approache 2
Maybe a solution is a rewrite of the URLs on apache? Like this:
Request to
-> www.mysite1.de -> ofbiz-server.net:8080/store1
I have no expierience with that...
Any tips welcome...I will document that on the wiki
This our current configuration ofbiz-container.xml which works with one
website or with different mountpoints for each website
<container name="catalina-container" class=
"org.ofbiz.catalina.container.CatalinaContainer">
<!-- static configuration for tomcat -->
....
<!-- one or more tomcat engines (servers); components map to this
+ host -->
<property name="default-server" value="engine">
<property name="default-host" value="0.0.0.0"/>
....
</property>
<!-- all connectors support type, host, port, enable-lookups -->
<!-- <property name="ajp-connector" value="connector">
<property name="type" value="ajp"/>
<property name="host" value="0.0.0.0"/>
<property name="port" value="8009"/>
-->
.....
</property>
<property name="http-connector" value="connector">
<property name="type" value="http"/>
<property name="host" value="0.0.0.0"/>
<property name="port" value="8080"/>
<property name="debug" value="0"/>
<property name="enable-lookups" value="true"/>
.....
</property>
<property name="https-connector" value="connector">
<property name="type" value="https"/>
<property name="host" value="0.0.0.0"/>
<property name="port" value="8443"/>
<property name="debug" value="0"/>
<property name="enable-lookups" value="true"/>
...
</property>
</container>
component/ecommerce/ofbiz-component.xml
<ofbiz-component name="ecommerce">
....
<webapp name="ecommerce"
title="ECommerce"
server="default-server"
location="webapp/ecommerce"
mount-point="/ecommerce"
app-bar-display="false"/>
<webapp name="adiva-ch"
title="Shop Adiva Schweiz"
server="default-server"
location="webapp/adiva.ch"
mount-point="/adiva-ch"
app-bar-display="false"/>
<webapp name="adiva-de"
title="Shop Adiva Deutschland"
server="default-server"
location="webapp/adiva-de"
mount-point="/adiva-de"
app-bar-display="false"/>
<webapp name="amandus"
title="Shop Amandus"
server="default-server"
location="webapp/amandus"
mount-point="/amandus"
app-bar-display="false"/>
</ofbiz-component>
We need all webapps mount at /
webapp/adiva-ch/WEB-INF/web.xml
<web-app>
<display-name>Open For Business - demostore</display-name>
<description>Demo Store for the Open For Business Project</description
>
<context-param>
<param-name>webSiteId</param-name>
<param-value>ADIVA-CH</param-value>
<description>A unique ID used to look up the WebSite entity to get
information about catalogs, etc.</description>
.....
</web-app>
What am I missing?
Thanks
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at ofbiz.dev.java.net
For additional commands, e-mail: users-help at ofbiz.dev.java.net
More information about the Users
mailing list