Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
634 lines (550 sloc) 43.6 KB
<?xml version="1.0" encoding="UTF-8" ?>
<!-- No copyright or license for configuration file, details here are not considered a creative work. -->
<moqui-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-2.0.xsd">
<!-- Settings in this file can be overridden in a component (MoquiConf.xml) and/or runtime conf file that has
any of the desired sub-elements. -->
<!-- Default properties are only set if there is no Java property or environment variable of the same name (or with underscores replaced by dots) -->
<default-property name="webapp_http_host" value=""/>
<default-property name="webapp_http_port" value=""/>
<default-property name="webapp_https_port" value=""/>
<default-property name="webapp_https_enabled" value="false"/>
<default-property name="entity_ds_db_conf" value="h2"/>
<default-property name="entity_ds_host" value="localhost"/>
<default-property name="entity_ds_port" value=""/>
<default-property name="entity_ds_database" value="moqui"/>
<default-property name="entity_ds_url" value="jdbc:h2:${moqui_runtime}/db/h2/${entity_ds_database};lock_timeout=30000"/>
<default-property name="entity_ds_schema" value=""/>
<default-property name="entity_ds_user" value="sa"/>
<default-property name="entity_ds_password" value="sa"/>
<tools empty-db-load="seed,seed-initial,install" worker-queue="65535" worker-pool-core="4" worker-pool-max="16" worker-pool-alive="60">
<tool-factory class="org.moqui.impl.tools.MCacheToolFactory" init-priority="03" disabled="false"/>
<!-- Apache Commons JCS, an alternative for distributed caches (cannot be used as local cache as requires Serializable keys/values just like Hazelcast) -->
<!-- <tool-factory class="org.moqui.impl.tools.JCSCacheToolFactory" init-priority="09" disabled="true"/> -->
<!-- H2 Database ToolFactory - if h2 database active runs the H2 server for external access (local only depending on conf) -->
<tool-factory class="org.moqui.impl.tools.H2ServerToolFactory" init-priority="12" disabled="false"/>
<!-- Jackrabbit ToolFactory for running Jackrabbit if plugged in -->
<tool-factory class="org.moqui.impl.tools.JackrabbitRunToolFactory" init-priority="40" disabled="true"/>
<!-- SubEtha SMTP ToolFactory starts an SMTP server using the MOQUI_LOCAL EmailServer settings, emails received trigger EMECA rules -->
<tool-factory class="org.moqui.impl.tools.SubEthaSmtpToolFactory" init-priority="50" disabled="true"/>
</tools>
<cache-list warm-on-start="true" local-factory="MCache" distributed-factory="MCache">
<!-- Entity Database Record Caches (and cache clear assist data) -->
<!-- set type="distributed" to use the distributed cache -->
<cache name="entity.record.one." max-elements="20000" eviction-strategy="least-frequently-used"
key-type="org.moqui.entity.EntityCondition" value-type="org.moqui.impl.entity.EntityValueBase"/>
<cache name="entity.record.list." max-elements="10000" eviction-strategy="least-frequently-used"
key-type="org.moqui.entity.EntityCondition" value-type="org.moqui.impl.entity.EntityListImpl"/>
<cache name="entity.record.count." max-elements="10000" eviction-strategy="least-frequently-used"
key-type="org.moqui.entity.EntityCondition" value-type="Long"/>
<cache name="entity.record.one_ra." max-elements="40000" eviction-strategy="least-frequently-used"
key-type="org.moqui.entity.EntityCondition" value-type="Set"/>
<cache name="entity.record.one_view_ra." max-elements="40000" eviction-strategy="least-frequently-used"
key-type="org.moqui.entity.EntityCondition" value-type="Set"/>
<cache name="entity.record.one_bf" max-elements="1000" eviction-strategy="least-frequently-used"
value-type="Set"/>
<cache name="entity.record.list_ra." max-elements="20000" eviction-strategy="least-frequently-used"
key-type="org.moqui.entity.EntityCondition" value-type="Set"/>
<cache name="entity.record.list_view_ra." max-elements="20000" eviction-strategy="least-frequently-used"
key-type="org.moqui.entity.EntityCondition" value-type="Set"/>
<!-- Framework configuration and artifact caches -->
<!-- NOTE: Production mode by default - No expiration of conf and impl artifacts. -->
<cache name="entity.definition" value-type="org.moqui.impl.entity.EntityDefinition"/>
<cache name="entity.location" value-type="Map"/>
<cache name="entity.sequence.bank" value-type="long[]"/>
<!-- this is info for each entity for real-time push DataFeeds; expires every 15 min to get DataFeed and DataDocument updates -->
<cache name="entity.data.feed.info" expire-time-live="900" value-type="ArrayList"/>
<cache name="service.location" value-type="org.moqui.impl.service.ServiceDefinition"/>
<cache name="service.rest.api" value-type="org.moqui.impl.service.RestApi$ResourceNode"/>
<cache name="kie.component.releaseId" value-type="org.kie.api.builder.ReleaseId"/>
<cache name="kie.session.component" value-type="String"/>
<cache name="screen.location" value-type="org.moqui.impl.screen.ScreenDefinition"/>
<cache name="screen.location.perm" value-type="org.moqui.impl.screen.ScreenDefinition"/>
<cache name="screen.url" value-type="org.moqui.impl.screen.ScreenUrlInfo"/>
<cache name="screen.info" value-type="List"/>
<cache name="screen.info.ref.rev" value-type="Set"/>
<cache name="screen.template.mode" value-type="freemarker.template.Template"/>
<cache name="screen.template.location" value-type="freemarker.template.Template"/>
<cache name="widget.template.location" value-type="MNode"/>
<cache name="screen.find.path" value-type="ArrayList"/>
<cache name="screen.form.db.node" value-type="MNode"/>
<cache name="resource.xml-actions.location" value-type="org.moqui.impl.actions.XmlAction"/>
<cache name="resource.groovy.location" value-type="java.lang.Class"/>
<cache name="resource.javascript.location" value-type="java.lang.Class"/>
<!-- These caches must be local caches (use additional methods on MCache not in javax.cache.Cache) -->
<cache name="resource.ftl.location" value-type="freemarker.template.Template" type="local"/>
<cache name="resource.gstring.location" value-type="groovy.text.Template" type="local"/>
<cache name="resource.wiki.location" value-type="String" type="local"/>
<cache name="resource.markdown.location" value-type="String" type="local"/>
<cache name="resource.text.location" value-type="String" type="local"/>
<cache name="resource.reference.location" value-type="org.moqui.resource.ResourceReference"/>
<cache name="l10n.message" expire-time-idle="3600" max-elements="50000" value-type="String"/>
<!-- this is a count of all artifact hits, expire once idle for over 15 minutes -->
<cache name="artifact.tarpit.hits" expire-time-idle="900" max-elements="10000" value-type="ArrayList"/>
</cache-list>
<server-stats bin-length-seconds="900" visit-enabled="true" visit-ip-info-on-login="true" visitor-enabled="true">
<!-- these are meant to be good production settings -->
<artifact-stats type="AT_XML_SCREEN" persist-bin="true" persist-hit="true"/>
<artifact-stats type="AT_XML_SCREEN_CONTENT" persist-bin="true" persist-hit="false"/>
<artifact-stats type="AT_XML_SCREEN_TRANS" persist-bin="true" persist-hit="true"/>
<artifact-stats type="AT_SERVICE" persist-bin="true" persist-hit="false"/>
<artifact-stats type="AT_ENTITY" persist-bin="false"/>
</server-stats>
<webapp-list>
<!-- The webapp.@name is looked up based on the value of the 'moqui-name' context-param in the web.xml file -->
<webapp name="webroot" http-port="${webapp_http_port}" http-host="${webapp_http_host}" https-port="${webapp_https_port}"
https-host="${webapp_http_host}" https-enabled="${webapp_https_enabled}"
require-session-token="true" websocket-timeout="600000">
<!-- root and error screens for OOTB runtime directory (moqui/moqui-runtime repository) -->
<root-screen host=".*" location="component://webroot/screen/webroot.xml"/>
<error-screen error="unauthorized" screen-path="error/Unauthorized"/>
<error-screen error="forbidden" screen-path="error/Forbidden"/>
<error-screen error="not-found" screen-path="error/NotFound"/>
<error-screen error="too-many" screen-path="error/TooMany"/>
<error-screen error="internal-error" screen-path="error/InternalError"/>
<!-- lifecycle actions examples, none by default:
<first-hit-in-visit><actions><log level="info" message="========================== first-hit-in-visit actions"/></actions></first-hit-in-visit>
<before-request><actions><log level="info" message="========================== before-request actions"/></actions></before-request>
<after-request><actions><log level="info" message="========================== after-request actions"/></actions></after-request>
<after-login><actions><log level="info" message="========================== after-login actions"/></actions></after-login>
<before-logout><actions><log level="info" message="========================== before-logout actions"/></actions></before-logout>
<after-startup><actions><log level="info" message="========================== after-startup actions"/></actions></after-login>
<before-shutdown><actions><log level="info" message="========================== before-shutdown actions"/></actions></before-logout>
-->
<!-- Moqui Session Listener (necessary to handle expired sessions, etc) -->
<listener class="org.moqui.impl.webapp.MoquiSessionListener"/>
<servlet name="MoquiServlet" class="org.moqui.impl.webapp.MoquiServlet" load-on-startup="1">
<url-pattern>/*</url-pattern>
</servlet>
<servlet name="MoquiFopServlet" class="org.moqui.impl.webapp.MoquiFopServlet" load-on-startup="1">
<url-pattern>/fop/*</url-pattern>
</servlet>
<!-- timeout session in 60 minutes without a request -->
<session-config timeout="60"/>
<!-- Notification Message Endpoint -->
<endpoint path="/notws" class="org.moqui.impl.webapp.NotificationEndpoint" timeout="3600000" enabled="true"/>
</webapp>
</webapp-list>
<artifact-execution-facade>
<artifact-execution type="AT_XML_SCREEN" authz-enabled="true" tarpit-enabled="true"/>
<artifact-execution type="AT_XML_SCREEN_TRANS" authz-enabled="true" tarpit-enabled="true"/>
<artifact-execution type="AT_SERVICE" authz-enabled="true" tarpit-enabled="true"/>
<!-- NOTE: entity tarpit disabled by default for performance and tracking overhead reasons -->
<artifact-execution type="AT_ENTITY" authz-enabled="true" tarpit-enabled="false"/>
</artifact-execution-facade>
<user-facade>
<password encrypt-hash-type="SHA-256" min-length="6" min-digits="1" min-others="1"
history-limit="5" change-weeks="104" email-require-change="true" email-expire-hours="48"/>
<login-key encrypt-hash-type="SHA-256" expire-hours="144"/><!-- default expire 6 days, 144 hours -->
<login max-failures="3" disable-minutes="5" history-store="true" history-incorrect-password="false"/>
</user-facade>
<transaction-facade use-transaction-cache="true">
<!-- Use this for the internal transaction manager (not through JNDI) -->
<transaction-internal class="org.moqui.impl.context.TransactionInternalBitronix"/>
<!-- If this is not present the default JNDI server will be used -->
<!-- <server-jndi context-provider-url="rmi://127.0.0.1:1099"
initial-context-factory="com.sun.jndi.rmi.registry.RegistryContextFactory"
url-pkg-prefixes="java.naming.rmi.security.manager"
security-principal="" security-credentials=""/> -->
<!-- Use this for getting JTA objects from JNDI -->
<!-- <transaction-jndi transaction-manager-jndi-name="java:comp/UserTransaction"
user-transaction-jndi-name="java:comp/UserTransaction"/> -->
<!-- UserTransaction JNDI name for most servers: java:comp/UserTransaction (Resin, Orion, OC4J, etc);
JBoss (separate objects): "java:comp/UserTransaction" and "java:comp/TransactionManager" -->
</transaction-facade>
<resource-facade xml-actions-template-location="classpath://template/XmlActions.groovy.ftl">
<!-- resource reference class needs to implement the org.moqui.resource.ResourceReference interface -->
<resource-reference scheme="http" class="org.moqui.resource.UrlResourceReference"/>
<resource-reference scheme="https" class="org.moqui.resource.UrlResourceReference"/>
<resource-reference scheme="file" class="org.moqui.resource.UrlResourceReference"/>
<resource-reference scheme="ftp" class="org.moqui.resource.UrlResourceReference"/>
<resource-reference scheme="jar" class="org.moqui.resource.UrlResourceReference"/>
<resource-reference scheme="bundleresource" class="org.moqui.resource.UrlResourceReference"/>
<resource-reference scheme="wsjar" class="org.moqui.resource.UrlResourceReference"/>
<resource-reference scheme="classpath" class="org.moqui.resource.ClasspathResourceReference"/>
<resource-reference scheme="component" class="org.moqui.impl.context.reference.ComponentResourceReference"/>
<resource-reference scheme="content" class="org.moqui.impl.context.reference.ContentResourceReference"/>
<resource-reference scheme="dbresource" class="org.moqui.impl.context.reference.DbResourceReference"/>
<!-- renderer class needs to implement the org.moqui.context.TemplateRenderer interface -->
<template-renderer extension="ftl" class="org.moqui.impl.context.renderer.FtlTemplateRenderer"/>
<template-renderer extension="html.ftl" class="org.moqui.impl.context.renderer.FtlTemplateRenderer"/>
<template-renderer extension="gstring" class="org.moqui.impl.context.renderer.GStringTemplateRenderer"/>
<template-renderer extension="html.gstring" class="org.moqui.impl.context.renderer.GStringTemplateRenderer"/>
<template-renderer extension="md" class="org.moqui.impl.context.renderer.MarkdownTemplateRenderer"/>
<template-renderer extension="markdown" class="org.moqui.impl.context.renderer.MarkdownTemplateRenderer"/>
<template-renderer extension="md.ftl" class="org.moqui.impl.context.renderer.FtlMarkdownTemplateRenderer"/>
<template-renderer extension="markdown.ftl" class="org.moqui.impl.context.renderer.FtlMarkdownTemplateRenderer"/>
<!-- a renderer for .html isn't necessary because the default is to write the text as-is, however this is useful
so that the extension becomes a default extension and doesn't have to be in the URL -->
<template-renderer extension="html" class="org.moqui.impl.context.renderer.NoTemplateRenderer"/>
<!-- this is just an example, always use the ScriptRunner interface instead of javax.script because javax.script
does not support compiling class scripts and running methods within the class, but Groovy does
<script-runner extension=".groovy" engine="groovy"/>
-->
<script-runner extension=".groovy" class="org.moqui.impl.context.runner.GroovyScriptRunner"/>
<script-runner extension=".xml" class="org.moqui.impl.context.runner.XmlActionsScriptRunner"/>
<!-- the javascript engine (Rhino) is built into Java starting with version 6, so we can support it without extra libs -->
<script-runner extension=".js" engine="javascript"/>
</resource-facade>
<screen-facade boundary-comments="false" default-autocomplete-rows="20" default-paginate-rows="20">
<screen-text-output type="csv" mime-type="text/csv" always-standalone="true"
macro-template-location="template/screen-macro/DefaultScreenMacros.csv.ftl"/>
<screen-text-output type="html" mime-type="text/html"
macro-template-location="template/screen-macro/DefaultScreenMacros.html.ftl"/>
<screen-text-output type="text" mime-type="text/plain"
macro-template-location="template/screen-macro/DefaultScreenMacros.text.ftl"/>
<screen-text-output type="xml" mime-type="text/xml"
macro-template-location="template/screen-macro/DefaultScreenMacros.xml.ftl"/>
<screen-text-output type="xsl-fo" mime-type="text/xml" always-standalone="true"
macro-template-location="template/screen-macro/DefaultScreenMacros.xsl-fo.ftl"/>
<!-- vuet is a custom extension for Vue JS component templates (extended HTML) -->
<screen-text-output type="vuet" mime-type="text/html" always-standalone="true"
macro-template-location="template/screen-macro/DefaultScreenMacros.vuet.ftl"/>
</screen-facade>
<service-facade distributed-factory="" scheduled-job-check-time="60">
<!-- NOTE: scheduled service jobs are managed using Quartz Scheduler, see quartz configuration for more details -->
<service-location name="main-xml" location="http://localhost:8080/rpc/xml"/>
<service-location name="main-json" location="http://localhost:8080/rpc/json"/>
<!-- runner-class needs to implement the org.moqui.impl.service.ServiceRunner interface -->
<service-type name="inline" runner-class="org.moqui.impl.service.runner.InlineServiceRunner"/>
<service-type name="entity-auto" runner-class="org.moqui.impl.service.runner.EntityAutoServiceRunner"/>
<service-type name="script" runner-class="org.moqui.impl.service.runner.ScriptServiceRunner"/>
<service-type name="java" runner-class="org.moqui.impl.service.runner.JavaServiceRunner"/>
<service-type name="remote-json-rpc" runner-class="org.moqui.impl.service.runner.RemoteJsonRpcServiceRunner"/>
<!-- not commonly used, see class: <service-type name="remote-xml-rpc" runner-class="org.moqui.impl.service.runner.RemoteXmlrpcServiceRunner"/> -->
<!-- These are not needed for running classpath services, are for service reference (known services) -->
<service-file location="classpath://service/org/moqui/EmailServices.xml"/>
<service-file location="classpath://service/org/moqui/EntityServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/BasicServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/ElFinderServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/EmailServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/EntityServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/EntitySyncServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/InstanceServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/PrintServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/ScreenServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/ServerServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/ServiceServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/SystemMessageServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/UserServices.xml"/>
<service-file location="classpath://service/org/moqui/impl/WikiServices.xml"/>
<service-file location="classpath://service/org/moqui/search/SearchServices.xml"/>
</service-facade>
<entity-facade default-group-name="transactional" entity-eca-enabled="true" sequenced-id-prefix=""
distributed-cache-invalidate="false" dci-topic-factory="" query-stats="false"
crypt-salt="SkcorIuqom" crypt-iter="10" crypt-algo="PBEWithMD5AndDES" crypt-pass="">
<!-- NOTE: no crypt-pass attribute by default, must specify in your conf file! -->
<!-- The entity-facade.@default-group-name=transactional, so if other entity groups do not have a data source
the transactional group's datasource will be used. -->
<!-- If this is not present the default JNDI server will be used:
<server-jndi context-provider-url="rmi://127.0.0.1:1099"
initial-context-factory="com.sun.jndi.rmi.registry.RegistryContextFactory"
url-pkg-prefixes="java.naming.rmi.security.manager"
security-principal="" security-credentials=""/>
-->
<!--
The configurations below will use the XADataSource directly to connect, which is required for proper
transaction handling with multiple data sources.
To use the non-XA variety just specify the normal JDBC parameters (like jdbc-uri, etc) and leave out the
xa-properties element. If the xa-properties element is present the normal JDBC parameters will be ignored.
To use a DataSource from JNDI use something the jndi-jdbc element under the datasource element:
<jndi-jdbc jndi-name="java:/MoquiDataSource"/>
NOTE: for production usage there is one connection pool per datasource so use as few datasources as possible.
The main datasource should have a max size large enough for all servlet container threads plus a few for
the worker pool (see tools.@worker-pool-max). Note that Bitronix has a 30 second timeout waiting for a
connection from the pool, and currently connections are NOT shared between transactions (only released when
a tx is closed).
Good numbers for a decent sized server are 100 servlet container (Jetty) threads, 16 worker threads, plus a
few extra so 120 connections in the main pool.
-->
<datasource group-name="transactional" database-conf-name="${entity_ds_db_conf}" schema-name="${entity_ds_schema}">
<!-- by default no inline-jdbc or jndi-jdbc elements, use default from database conf -->
</datasource>
<!-- The nontransactional group is in the transactional db by default. To use OrientDB use the datasource below.
NOTE: startup-add-missing=true is required because OrientDB doesn't allow class create in a TX
NOTE: adding more entities to the nontransactional group is a work in progress, this will not currently run,
but you can use a similar configuration for your own entity groups
-->
<!--
<datasource group-name="nontransactional" startup-add-missing="true"
object-factory="org.moqui.impl.entity.orientdb.OrientDatasourceFactory">
<inline-other uri="plocal:${ORIENTDB_HOME}/databases/MoquiNoSql" username="admin" password="admin"/>
</datasource>
-->
<!-- Refer to these explicitly instead of by directory name convention as is done in components.
There is no reliable way to search within directories on the classpath (if in a file or jar is fine, but
not in a war/ear file or from special ClassLoaders) -->
<!-- in framework/entity -->
<load-entity location="classpath://entity/BasicEntities.xml"/>
<load-entity location="classpath://entity/EntityEntities.xml"/>
<load-entity location="classpath://entity/OlapEntities.xml"/>
<load-entity location="classpath://entity/ResourceEntities.xml"/>
<load-entity location="classpath://entity/ScreenEntities.xml"/>
<load-entity location="classpath://entity/SecurityEntities.xml"/>
<load-entity location="classpath://entity/ServerEntities.xml"/>
<load-entity location="classpath://entity/ServiceEntities.xml"/>
<load-entity location="classpath://entity/TestEntities.xml"/>
<!-- in framework/data -->
<load-data location="classpath://data/CommonL10nData.xml"/>
<load-data location="classpath://data/CurrencyData.xml"/>
<load-data location="classpath://data/EntityTypeData.xml"/>
<load-data location="classpath://data/GeoCountryData.xml"/>
<load-data location="classpath://data/SecurityTypeData.xml"/>
<load-data location="classpath://data/ServiceTypeData.xml"/>
<load-data location="classpath://data/UnitData.xml"/>
</entity-facade>
<database-list>
<dictionary-type type="id" java-type="java.lang.String" default-sql-type="VARCHAR(40)"/>
<dictionary-type type="id-long" java-type="java.lang.String" default-sql-type="VARCHAR(255)"/>
<dictionary-type type="date" java-type="java.sql.Date" default-sql-type="DATE"/>
<dictionary-type type="time" java-type="java.sql.Time" default-sql-type="TIME"/>
<dictionary-type type="date-time" java-type="java.sql.Timestamp" default-sql-type="TIMESTAMP"/>
<dictionary-type type="number-integer" java-type="java.lang.Long" default-sql-type="NUMERIC(20,0)"/>
<dictionary-type type="number-decimal" java-type="java.math.BigDecimal" default-sql-type="NUMERIC(26,6)"/>
<dictionary-type type="number-float" java-type="java.lang.Double" default-sql-type="DOUBLE"/>
<dictionary-type type="currency-amount" java-type="java.math.BigDecimal" default-sql-type="NUMERIC(22,2)"/>
<dictionary-type type="currency-precise" java-type="java.math.BigDecimal" default-sql-type="NUMERIC(23,3)"/>
<dictionary-type type="text-indicator" java-type="java.lang.String" default-sql-type="CHAR(1)"/>
<dictionary-type type="text-short" java-type="java.lang.String" default-sql-type="VARCHAR(63)"/>
<dictionary-type type="text-medium" java-type="java.lang.String" default-sql-type="VARCHAR(255)"/>
<!-- text-long was 32000, but changed to 4095 because MySQL max size is 21K or so for a VARCHAR, and 64K for a
row (not including text-very-long), and it seems that the limit is bytes, not characters, so 4K characters
is 12K bytes... just like the old annoying column size which is now in characters, but the row size still
in bytes -->
<dictionary-type type="text-long" java-type="java.lang.String" default-sql-type="VARCHAR(4095)"/>
<dictionary-type type="text-very-long" java-type="java.lang.String" default-sql-type="CLOB"/>
<dictionary-type type="binary-very-long" java-type="java.sql.Blob" default-sql-type="BLOB"/>
<!--
* DB2:
* to support LIMIT and OFFSET: "db2set DB2_COMPATIBILITY_VECTOR=MYS" (and if already running: db2stop then db2start)
* default page size of 4k not adequate, use something like: "create database moqui pagesize 32 k"
* the database name in the example is 'moqui', note that in DB2 database names are limits to 8 bytes
<datasource group-name="transactional" database-conf-name="db2" schema-name="DB2INST1" startup-add-missing="true" runtime-add-missing="false">
<inline-jdbc><xa-properties user="db2inst1" password="db2inst1" serverName="localhost" portNumber="50000"
driverType="4" databaseName="moqui"/></inline-jdbc>
</datasource>
<datasource group-name="transactional" database-conf-name="db2" schema-name="" startup-add-missing="true" runtime-add-missing="false">
<inline-jdbc jdbc-uri="jdbc:db2://localhost:50000/moqui" jdbc-username="moqui" jdbc-password="moqui"/>
</datasource>
-->
<database name="db2" join-style="ansi" offset-style="limit"
default-isolation-level="ReadCommitted" for-update="FOR UPDATE WITH RS"
use-schema-for-all="true" use-indexes-unique="false" use-pk-constraint-names="false" fk-style="name_fk"
default-test-query="SELECT 1 FROM SYSIBM.SYSDUMMY1"
default-jdbc-driver="com.ibm.db2.jcc.DB2Driver"
default-xa-ds-class="com.ibm.db2.jcc.DB2XADataSource"
default-startup-add-missing="true" default-runtime-add-missing="false">
<database-type type="number-integer" sql-type="DECIMAL(20,0)"/>
<database-type type="number-decimal" sql-type="DECIMAL(26,6)"/>
<database-type type="number-float" sql-type="DECIMAL(30,12)"/>
<database-type type="currency-amount" sql-type="DECIMAL(22,2)"/>
<database-type type="currency-precise" sql-type="DECIMAL(23,3)"/>
<inline-jdbc><xa-properties driverType="4" serverName="${entity_ds_host}" portNumber="${entity_ds_port?:'50000'}"
databaseName="${entity_ds_database}" user="${entity_ds_user}" password="${entity_ds_password}"/></inline-jdbc>
</database>
<database name="db2i" join-style="ansi" offset-style="limit"
default-isolation-level="ReadCommitted" for-update="FOR UPDATE WITH RS"
use-schema-for-all="true" use-indexes-unique-where-not-null="true"
default-test-query="SELECT 1 FROM SYSIBM.SYSDUMMY1"
default-jdbc-driver="com.ibm.as400.access.AS400JDBCDriver"
default-xa-ds-class="com.ibm.as400.access.AS400JDBCXADataSource">
<database-type type="number-integer" sql-type="DECIMAL(20,0)"/>
<database-type type="number-decimal" sql-type="DECIMAL(26,6)"/>
<database-type type="number-float" sql-type="DECIMAL(30,12)"/>
<database-type type="currency-amount" sql-type="DECIMAL(22,2)"/>
<database-type type="currency-precise" sql-type="DECIMAL(23,3)"/>
<inline-jdbc><xa-properties driverType="4" serverName="${entity_ds_host}" portNumber="${entity_ds_port?:'50000'}"
databaseName="${entity_ds_database}" user="${entity_ds_user}" password="${entity_ds_password}"/></inline-jdbc>
</database>
<!--
* Derby:
<datasource group-name="transactional" database-conf-name="derby" schema-name="MOQUI">
<inline-jdbc><xa-properties databaseName="${moqui_runtime}/db/derby/moqui" createDatabase="create"/></inline-jdbc>
</datasource>
<datasource group-name="transactional" database-conf-name="derby" schema-name="MOQUI">
<inline-jdbc jdbc-uri="jdbc:derby:moqui;create=true" jdbc-username="moqui" jdbc-password="moqui"/>
</datasource>
-->
<database name="derby"
use-pk-constraint-names="false" use-indexes-unique="false" default-isolation-level="ReadCommitted"
default-jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
default-xa-ds-class="org.apache.derby.jdbc.EmbeddedXADataSource">
<!-- default-test-query="???" maybe like SELECT 1 FROM SEQUENCE_VALUE_ITEM WHERE 1=0 -->
<inline-jdbc><xa-properties databaseName="${moqui_runtime}/db/derby/${entity_ds_database}" createDatabase="create"/></inline-jdbc>
</database>
<!--
* H2 Database:
* NOTE: With this embedded H2 setup you can connect remotely using "jdbc:h2:tcp://localhost:9092/moqui"
<datasource group-name="transactional" database-conf-name="h2" schema-name="">
<inline-jdbc><xa-properties url="jdbc:h2:${moqui_runtime}/db/h2/moqui;lock_timeout=30000" user="sa" password=""/></inline-jdbc>
</datasource>
<datasource group-name="transactional" database-conf-name="h2" schema-name="">
<inline-jdbc jdbc-uri="jdbc:h2:${moqui_runtime}/db/h2/moqui;lock_timeout=30000" jdbc-username="sa" jdbc-password="sa"/>
</datasource>
-->
<database name="h2" use-pk-constraint-names="false" use-indexes-unique="true" default-isolation-level="ReadCommitted"
default-jdbc-driver="org.h2.Driver" default-xa-ds-class="org.h2.jdbcx.JdbcDataSource"
default-start-server-args="-tcpPort 9092 -ifExists -baseDir ${moqui_runtime}/db/h2">
<inline-jdbc><xa-properties url="${entity_ds_url}" user="${entity_ds_user}" password="${entity_ds_password}"/></inline-jdbc>
</database>
<!-- TODO: add configuration examples -->
<database name="hsql" use-fk-initially-deferred="false" join-style="ansi-no-parenthesis"
default-isolation-level="ReadUncommitted" default-jdbc-driver="org.hsqldb.jdbcDriver"
default-test-query="SELECT 1 FROM SEQUENCE_VALUE_ITEM WHERE 1=0">
<database-type type="id" sql-type="VARCHAR"/>
<database-type type="id-long" sql-type="VARCHAR"/>
<database-type type="number-integer" sql-type="BIGINT"/>
<database-type type="number-decimal" sql-type="DOUBLE"/>
<database-type type="number-float" sql-type="DOUBLE"/>
<database-type type="currency-amount" sql-type="DOUBLE"/>
<database-type type="currency-precise" sql-type="DOUBLE"/>
<database-type type="text-indicator" sql-type="CHAR"/>
<database-type type="text-short" sql-type="VARCHAR"/>
<database-type type="text-medium" sql-type="VARCHAR"/>
<database-type type="text-long" sql-type="VARCHAR"/>
<database-type type="text-very-long" sql-type="VARCHAR"/>
<database-type type="binary-very-long" sql-type="OBJECT" sql-type-alias="OTHER"/>
</database>
<!--
* MS SQL Server:
<datasource group-name="transactional" database-conf-name="mssql" schema-name="">
<inline-jdbc><xa-properties user="moqui" password="moqui" serverName="localhost" portNumber="1433"
databaseName="moqui"/></inline-jdbc>
</datasource>
<datasource group-name="transactional" database-conf-name="mssql" schema-name="">
<inline-jdbc jdbc-uri="jdbc:sqlserver://localhost:1433;databaseName=moqui" jdbc-username="moqui" jdbc-password="moqui"/>
</datasource>
-->
<database name="mssql" join-style="ansi" default-isolation-level="ReadCommitted" offset-style="cursor"
default-test-query="SELECT 1" default-jdbc-driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
default-xa-ds-class="com.microsoft.sqlserver.jdbc.SQLServerXADataSource">
<!-- NOTE: for MS SQL Server 2012 and later can use offset-style=fetch for better performance and consistent behavior -->
<database-type type="id" sql-type="NVARCHAR(40)"/>
<database-type type="id-long" sql-type="NVARCHAR(255)"/>
<database-type type="date" sql-type="DATETIME"/>
<database-type type="time" sql-type="DATETIME"/>
<database-type type="date-time" sql-type="DATETIME"/>
<database-type type="number-integer" sql-type="DECIMAL(20,0)"/>
<database-type type="number-decimal" sql-type="DECIMAL(26,6)"/>
<database-type type="number-float" sql-type="DECIMAL(32,12)"/>
<database-type type="currency-amount" sql-type="DECIMAL(22,2)"/>
<database-type type="currency-precise" sql-type="DECIMAL(23,3)"/>
<database-type type="text-indicator" sql-type="CHAR(1)"/>
<database-type type="text-short" sql-type="NVARCHAR(63)"/>
<database-type type="text-medium" sql-type="NVARCHAR(255)"/>
<database-type type="text-long" sql-type="NVARCHAR(4000)"/>
<database-type type="text-very-long" sql-type="TEXT"/>
<database-type type="binary-very-long" sql-type="IMAGE"/>
<inline-jdbc><xa-properties serverName="${entity_ds_host}" portNumber="${entity_ds_port?:'1433'}"
databaseName="${entity_ds_database}" user="${entity_ds_user}" password="${entity_ds_password}"/></inline-jdbc>
</database>
<!--
* MySQL (similar for Percona Server, MariaDB, AWS Aurora):
<datasource group-name="transactional" database-conf-name="mysql" schema-name="">
<inline-jdbc><xa-properties user="moqui" password="moqui" pinGlobalTxToPhysicalConnection="true"
serverName="127.0.0.1" port="3306" databaseName="moqui" autoReconnectForPools="true"
useUnicode="true" encoding="UTF-8"/></inline-jdbc>
</datasource>
<datasource group-name="transactional" database-conf-name="mysql" schema-name="">
<inline-jdbc jdbc-uri="jdbc:mysql://127.0.0.1:3306/moqui?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF-8"
jdbc-username="moqui" jdbc-password="moqui"/>
</datasource>
-->
<database name="mysql" join-style="ansi-no-parenthesis" offset-style="limit"
table-engine="InnoDB" character-set="utf8" collate="utf8_general_ci"
default-isolation-level="ReadCommitted" use-tm-join="true"
default-jdbc-driver="com.mysql.jdbc.Driver"
default-xa-ds-class="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"
default-test-query="SELECT 1">
<!--
NOTE: to support 4 byte UTF-8 characters use 'utf8mb4' for character-set, and a corresponding collate such as
'utf8mb4_col'. Use this character set and collate when creating your database/schema in MySQL before running Moqui,
and if set here it will be set on tables that are created as well. For existing databases already set to plain utf8
you'll need to run SQL statements on MySQL to change the character set and collate for each table.
-->
<!-- use DATETIME instead of TIMESTAMP so can be null and gets no default value; issue with newer MySQL versions -->
<!-- NOTE: DATETIME(3) is supported, and needed, on MySQL 5.7; for earlier versions removed the '(3)' as it has millisecond precision by default -->
<database-type type="date-time" sql-type="DATETIME(3)"/>
<database-type type="number-integer" sql-type="DECIMAL(20,0)"/>
<database-type type="number-decimal" sql-type="DECIMAL(26,6)"/>
<database-type type="number-float" sql-type="DECIMAL(32,12)"/>
<database-type type="currency-amount" sql-type="DECIMAL(22,2)"/>
<database-type type="currency-precise" sql-type="DECIMAL(23,3)"/>
<database-type type="text-very-long" sql-type="LONGTEXT"/>
<database-type type="binary-very-long" sql-type="LONGBLOB"/>
<inline-jdbc><xa-properties pinGlobalTxToPhysicalConnection="true" autoReconnectForPools="true" useUnicode="true" encoding="UTF-8"
serverName="${entity_ds_host}" port="${entity_ds_port?:'3306'}" databaseName="${entity_ds_database}"
user="${entity_ds_user}" password="${entity_ds_password}"/></inline-jdbc>
</database>
<!--
* Oracle:
<datasource group-name="transactional" database-conf-name="oracle" schema-name="MOQUI">
<inline-jdbc><xa-properties user="moqui" password="moqui" URL="jdbc:oracle:thin:@127.0.0.1:1521:moqui"/></inline-jdbc>
</datasource>
<datasource group-name="transactional" database-conf-name="oracle" schema-name="MOQUI">
<inline-jdbc jdbc-uri="jdbc:oracle:thin:@127.0.0.1:1521:moqui" jdbc-username="moqui" jdbc-password="moqui"/>
</datasource>
-->
<database name="oracle" join-style="ansi" default-isolation-level="ReadCommitted"
default-test-query="SELECT 1 FROM DUAL" default-jdbc-driver="oracle.jdbc.driver.OracleDriver"
default-xa-ds-class="oracle.jdbc.xa.client.OracleXADataSource">
<database-type type="id" sql-type="VARCHAR2(40)"/>
<database-type type="id-long" sql-type="VARCHAR2(255)"/>
<database-type type="number-integer" sql-type="NUMBER(20,0)"/>
<database-type type="number-decimal" sql-type="NUMBER(26,6)"/>
<database-type type="number-float" sql-type="NUMBER(32,12)"/>
<database-type type="currency-amount" sql-type="NUMBER(22,2)"/>
<database-type type="currency-precise" sql-type="NUMBER(23,3)"/>
<database-type type="text-short" sql-type="VARCHAR2(10)"/>
<database-type type="text-medium" sql-type="VARCHAR2(255)"/>
<database-type type="text-long" sql-type="VARCHAR2(4000)"/>
<inline-jdbc><xa-properties user="${entity_ds_user}" password="${entity_ds_password}"
URL="jdbc:oracle:thin:@${entity_ds_host}:${entity_ds_port?:'1521'}:${entity_ds_database}"/></inline-jdbc>
</database>
<!-- for future reference (OrientDB with JDBC driver): <database name="orientdb"
use-pk-constraint-names="false" default-isolation-level="ReadCommitted"
default-jdbc-driver="com.orientechnologies.orient.jdbc.OrientJdbcDriver"
default-xa-ds-class="">
</database> -->
<!--
* PostgreSQL:
<datasource group-name="transactional" database-conf-name="postgres" schema-name="public" startup-add-missing="true" runtime-add-missing="false">
<inline-jdbc><xa-properties user="moqui" password="moqui" serverName="localhost" portNumber="5432"
databaseName="moqui"/></inline-jdbc>
</datasource>
<datasource group-name="transactional" database-conf-name="postgres" schema-name="public" startup-add-missing="true" runtime-add-missing="false">
<inline-jdbc jdbc-uri="jdbc:postgresql://127.0.0.1/moqui" jdbc-username="moqui" jdbc-password="moqui"/>
</datasource>
-->
<database name="postgres" use-fk-initially-deferred="false" join-style="ansi" result-fetch-size="50"
default-isolation-level="ReadCommitted" use-tm-join="true" default-test-query="SELECT 1"
default-jdbc-driver="org.postgresql.Driver" default-xa-ds-class="org.postgresql.xa.PGXADataSource"
default-startup-add-missing="true" default-runtime-add-missing="false">
<!-- NOTE: when Postgres JDBC driver updated can set use-tm-join="true" -->
<database-type type="number-float" sql-type="FLOAT8"/>
<database-type type="text-medium" sql-type="TEXT"/>
<database-type type="text-long" sql-type="TEXT"/>
<database-type type="text-very-long" sql-type="TEXT"/>
<database-type type="binary-very-long" sql-type="BYTEA"/>
<inline-jdbc><xa-properties serverName="${entity_ds_host}" portNumber="${entity_ds_port?:'5432'}"
databaseName="${entity_ds_database}" user="${entity_ds_user}" password="${entity_ds_password}"/></inline-jdbc>
</database>
</database-list>
<repository-list>
<!-- No JCR repo by default, but here are some examples: -->
<!-- requires 'org.apache.jackrabbit:jackrabbit-jcr-rmi' in the classpath:
<repository name="main" workspace="default" username="admin" password="admin">
<init-param name="org.apache.jackrabbit.repository.uri" value="http://localhost:8081/rmi"/></repository> -->
<!-- requires 'org.apache.jackrabbit:jackrabbit-jcr2dav' in the classpath:
<repository name="main" workspace="default" username="admin" password="admin">
<init-param name="org.apache.jackrabbit.spi2davex.uri" value="http://localhost:8081/server"/></repository> -->
</repository-list>
<component-list>
<component-dir location="base-component"/>
<component-dir location="mantle"/>
<component-dir location="component"/>
<component-dir location="ecomponent"/>
<!-- Here are some examples of explicitly loading the example component in different ways: -->
<!-- <component name="example" location="component/example"/> -->
<!-- <component name="example" location="content://main/component/example"/> -->
</component-list>
</moqui-conf>