Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Replaces org.ofbiz by org.apache.ofbiz

...

Panel

<Tenant tenantId="TENANT" tenantName="Tenant Name"/>
<TenantDataSource tenantId="TENANT" entityGroupName="org.apache.ofbiz" jdbcUri="jdbc:postgresql://host:port/DEMO1_db" jdbcUsername="username" jdbcPassword="password"/>
<TenantDataSource tenantId="TENANT" entityGroupName="org.apache.ofbiz.olap" jdbcUri="jdbc:derby:ofbizolap_TENANT; create=true" jdbcUsername="username" jdbcPassword="password"/>

Note

The JDBC URIs follow the naming convention for JDBC connection strings. Credentials as you please. Of course you can add any data source to any of the two entity groups. Do not specify a datasource for entity group 'org.apache.ofbiz.tenant' here!

This information will be stored on the database that you specify underneath the org.apache.ofbiz.tenant entity group on entityengine.xml.

...

This means: If you decide to assign this file load to the reader="ext", you need to execute the following data read sequence before you can access the tenant databases:

Code Block

$ java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=seed -delegator=default
$ java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=seed-initial -delegator=default
$ java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=ext -delegator=default

Of course you can group this all into a single data loader run:

Code Block

$ java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=seed,seed-initial,ext -delegator=default

...

Panel

<delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
(...)
<group-map group-name="org.apache.ofbiz.tenant" datasource-name="localpostnewtenants"/>
(...)
</delegator>

...

Info

All of the following commands must be executed in sequence.

Code Block

$ svn co [https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk] ofbiz
$ ant
$ java \-Xmx512m \-XX:MaxPermSize=128m \-jar ofbiz.jar \-install \-readers=seed \-delegator=default
$ java \-Xmx512m \-XX:MaxPermSize=128m \-jar ofbiz.jar \-install \-readers=seed \-delegator=default#DEMO1
$ java \-Xmx512m \-XX:MaxPermSize=128m \-jar ofbiz.jar \-install \-readers=seed \-delegator=default#DEMO2
$ ant run

...

Then, ensure that exists a "ProductStore" related with the "WebSite" settled in the parameter webSiteId of the previous web.xml file. You can load a demo product store (related with the websiteId "WebStore") doing this:

Code Block

$OFBIZ_HOME> java -Xmx512m -XX:MaxPermSize=128m -jar ofbiz.jar -install -readers=seed,demo -delegator=default#tenantId

...

You can determine a initial path used in the tenant

Code Block

<Tenant tenantId="TENANT" tenantName="Tenant Name" domainName="domain.name" initialPath="/initial"/>

...