blob: f44543eb8a0770e5904ccd3cd8378f3c1aa524a4 [file] [log] [blame]
<!-- @version $Id: repository_database.xml,v 1.22 2004/06/24 10:02:46 arminw Exp $ -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. The ASF licenses this file to You
under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Define here all used connections.
One defined connection should be defined as the default one,
by set default-connection="true" - this could be done at runtime too.
It is possible to set user/password at
runtime or let login different users at runtime using the same
database. Use different PBKey with same jcdAlias name but
different user/password.
Ditto it is possible to add jdbc-connection-descriptor at runtime
using the MetadataManager.
-->
<jdbc-connection-descriptor
jcd-alias="default"
default-connection="true"
platform="Hsqldb"
jdbc-level="2.0"
driver="org.hsqldb.jdbcDriver"
protocol="jdbc"
subprotocol="hsqldb"
dbalias="hsql://localhost"
username="sa"
password=""/>
<!--
<jdbc-connection-descriptor
jcd-alias="default"
default-connection="true"
platform="MySQL"
jdbc-level="3.0"
driver="com.mysql.jdbc.Driver"
protocol="jdbc"
subprotocol="mysql"
batch-mode="true"
dbalias="//localhost/jackrabbit"
username="root"
password=""/>
-->
<!-- this connection was used as the default one within OJB -->
<!--
<jdbc-connection-descriptor
jcd-alias="@JCD_ALIAS@"
default-connection="true"
platform="@DBMS_NAME@"
jdbc-level="@JDBC_LEVEL@"
driver="@DRIVER_NAME@"
protocol="@URL_PROTOCOL@"
subprotocol="@URL_SUBPROTOCOL@"
dbalias="@URL_DBALIAS@"
username="@USER_NAME@"
password="@USER_PASSWD@"
batch-mode="false"
useAutoCommit="1"
ignoreAutoCommitExceptions="false"
>
<object-cache class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl">
<attribute attribute-name="timeout" attribute-value="900"/>
<attribute attribute-name="autoSync" attribute-value="true"/>
</object-cache>
<connection-pool
maxActive="21"
validationQuery="@VALIDATION_QUERY@"
testOnBorrow="@TEST_ON_BORROW@"
testOnReturn="@TEST_ON_RETURN@"
/>
<sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
<attribute attribute-name="grabSize" attribute-value="20"/>
<attribute attribute-name="autoNaming" attribute-value="true"/>
<attribute attribute-name="globalSequenceId" attribute-value="false"/>
<attribute attribute-name="globalSequenceStart" attribute-value="10000"/>
</sequence-manager>
</jdbc-connection-descriptor>
-->
<!-- Datasource example -->
<!-- jdbc-connection-descriptor
jcd-alias="default"
default-connection="true"
platform="Hsqldb"
jdbc-level="2.0"
jndi-datasource-name="java:DefaultDS"
username="sa"
password=""
eager-release="false"
batch-mode="false"
useAutoCommit="0"
ignoreAutoCommitExceptions="false"
>
<sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl">
<attribute attribute-name="autoNaming" attribute-value="true"/>
</sequence-manager>
</jdbc-connection-descriptor -->
<!--
NOTE: This is a test descriptor used within
the junit test suite, do not change any value.
A test db connections used for junit tests.
This connection match a hsql database called 'OJB_FarAway'
If you do not use the test suite, you could delete
this descriptor.
This descriptor was used to check multiple database
use.
-->
<jdbc-connection-descriptor
jcd-alias="farAway"
platform="Hsqldb"
jdbc-level="2.0"
driver="org.hsqldb.jdbcDriver"
protocol="jdbc"
subprotocol="hsqldb"
dbalias="../OJB_FarAway"
username="sa"
password=""
batch-mode="false"
>
<connection-pool
maxActive="6"
whenExhaustedAction="0"
validationQuery="select count(*) from OJB_HL_SEQ"
/>
<sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
<attribute attribute-name="grabSize" attribute-value="5"/>
</sequence-manager>
</jdbc-connection-descriptor>
<!--
NOTE: This is a test descriptor used within
the junit test suite, do not change any value.
If you do not use the test suite, you could
delete this descriptor.
In the the test directory under
org.apache.ojb.broker.metadata.MetadataTest#testReadConnectionDescriptor
this descriptor will be evaluated.
-->
<jdbc-connection-descriptor
jcd-alias="testConnection"
default-connection="false"
platform="Oracle"
jdbc-level="1.0"
driver="a driver"
protocol="a protocol"
subprotocol="a subprotocol"
dbalias="myDbalias"
username="a user"
password="a password"
eager-release="true"
batch-mode="true"
useAutoCommit="0"
ignoreAutoCommitExceptions="true"
>
<object-cache class="org.apache.ojb.broker.cache.ObjectCacheEmptyImpl">
<attribute attribute-name="cacheKey1" attribute-value="cacheValue1"/>
<attribute attribute-name="cacheKey2" attribute-value="cacheValue2"/>
</object-cache>
<connection-pool
maxActive="1"
maxIdle="2"
maxWait="3"
minEvictableIdleTimeMillis="4"
numTestsPerEvictionRun="5"
testOnBorrow="true"
testOnReturn="true"
testWhileIdle="true"
timeBetweenEvictionRunsMillis="6"
whenExhaustedAction="2"
validationQuery="a query"
logAbandoned="true"
removeAbandoned="true"
removeAbandonedTimeout="8"
/>
<sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
<attribute attribute-name="key1" attribute-value="value1"/>
<attribute attribute-name="key2" attribute-value="value2"/>
</sequence-manager>
</jdbc-connection-descriptor>