# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# 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.



#####################################################
#
# There are four types of properties in this file
#
#
#  derby.module.<tag>=classname
#     - Defines a module in the cloudscape engine.
#       Tag must be unique within this file.
#       Its only meaning is to provide uniqness
#       and to tie the module with its environmental
#       requirements. The class name must implement
#       ModuleControl
#
#  cloudscape.config.<tag>=config[,config]*
#     - Indicates that the module defined by 
#       derby.module.tag should be present
#       only in some configurations, or product 
#       jar files.
#	Currently, there are 4 known configurations
#	cloudscape, cloudsync, cloud and cloudtarget.
#	A module *must* have a cloudscape.config.<tag> 
#	specified.
#	The configuration property is meaningful only to 
#	the propertyConfig tool which generates separate
#	properties file for each configuration, it has
#	no meaning to anything else.
#	There are two configuration designations that 
#	have special meaning: none and all.
#	none means this module should appear in no 
#	configuration and all means this module should
#	appear in all configurations.
#
#
#  derby.env.jdk.<tag>={1|2|4}
#     - Indicates that the module defined by
#       derby.module.tag can only run
#       in the given environment.
#       1 = jdk 1.1.x
#       2 = jdk 1.2.x (Java 2)
#       4 = jdk 1.4.x (Java 4)
#       5 = jdk 1.4.2
#       6 = J2SE 5.0
#       7 = Java SE 6
#     - if a particular module have alternate 
#       implementations for jdk1 versus jdk2 versus jdk4, then the
#       <tag> MUST BE of the form <name>J1 or <name>J2 or <name>J4.
#	For example, 
#	derby.module.classManagerJ1
#	derby.module.classManagerJ2
#	derby.module.classManagerJ4
#
#       This is so that the tool that automatically 
#       generate the dbms.properties file for a particular
#       configuration will know that these modules are
#       related in this special way.  
#	This knowledge is important because if we have 
#	a configuration which has a module that only has
#	Java1 implementation, then that module will not 
#	be loaded when run in a Java2 environment.
#	This will make cloudscape not work in a Java2 
#	environment if the module is non-optional.
#
#  derby.env.classes.<tag>=classname[,classname]*
#     - Indicates that the module defined by
#       derby.module.tag requires all of the
#       classes listed to be loadable by the current
#       environment. This classes are not obfuscated
#       and are expected to be third-party classes
#       such a java.*, javax.* or maribma etc.
#
#
#
#####################################################

#####################################################
#
# Special class grouping
#
# These classes are used to check for a JDBC20 ext environment
#   javax.sql.DataSource
#   javax.sql.ConnectionPoolDataSource
#   javax.sql.PooledConnection
#   javax.sql.XAConnection
#   javax.sql.XADataSource
#
#
# These classes are used to check for a JTA environment
#
#   javax.transaction.xa.Xid
#   javax.transaction.xa.XAResource
#   javax.transaction.xa.XAException
#
# These classes are used to check for a JNDI environment
#
#   javax.naming.spi.Resolver
#   javax.naming.Referenceable
#   javax.naming.directory.Attribute
#
# 
######################################################


#####################################################
# Monitor
#####################################################


#####################################################
# BasicServices
#####################################################

derby.module.uuidJ1=org.apache.derby.impl.services.uuid.BasicUUIDFactory
cloudscape.config.uuidJ1=all

derby.module.timerJ1=org.apache.derby.impl.services.timer.SingletonTimerFactory
cloudscape.config.timerJ1=all

# Use a different TimerFactory on Java 5 to take advantage of Timer.purge().
derby.module.timerJ6=org.apache.derby.impl.services.timer.Java5SingletonTimerFactory
derby.env.jdk.timerJ6=6
cloudscape.config.timerJ6=all

derby.module.cacheManagerJ1=org.apache.derby.impl.services.cache.ClockFactory
derby.env.jdk.cacheManagerJ1=1
cloudscape.config.cacheManagerJ1=all

# ConcurrentCache requires JDK 1.5 (constant 6)
derby.module.cacheManagerJ6=org.apache.derby.impl.services.cache.ConcurrentCacheFactory
derby.env.jdk.cacheManagerJ6=6
cloudscape.config.cacheManagerJ6=all

derby.module.daemon=org.apache.derby.impl.services.daemon.SingleThreadDaemonFactory
cloudscape.config.daemon=all

derby.module.javaCompiler=org.apache.derby.impl.services.bytecode.BCJava
cloudscape.config.javaCompiler=all

derby.module.lockManagerJ1=org.apache.derby.impl.services.locks.SinglePool
derby.env.jdk.lockManagerJ1=1
cloudscape.config.lockManagerJ1=all

# ConcurrentPool requires JDK 1.5 (constant 6)
derby.module.lockManagerJ6=org.apache.derby.impl.services.locks.ConcurrentPool
derby.env.jdk.lockManagerJ6=6
cloudscape.config.lockManagerJ6=all

derby.module.classManagerJ2=org.apache.derby.impl.services.reflect.ReflectClassesJava2
cloudscape.config.classManagerJ2=derby

# Java5ClassFactory requires JDK 1.5 (constant 6)
derby.module.classManagerJ6=org.apache.derby.impl.services.reflect.Java5ClassFactory
derby.env.jdk.classManagerJ6=6
cloudscape.config.classManagerJ6=derby

# cryptography - requires JDK 1.2 and greater and com.sun.crypto.provider.SunJCE
#
derby.module.cryptographyJ2=org.apache.derby.impl.services.jce.JCECipherFactoryBuilder
derby.env.jdk.cryptographyJ2=2
derby.env.classes.cryptographyJ2=javax.crypto.SecretKey
cloudscape.config.cryptographyJ2=derby

######################
# Connectivity
######################

# jdbc30 - requires JDK 1.4
#
derby.module.jdbcJ4=org.apache.derby.jdbc.Driver30
derby.env.jdk.jdbcJ4=4
derby.env.classes.jdbcJ4=java.sql.Driver
cloudscape.config.jdbcJ4=derby

# jdbc40 - requires JDK 1.6 (which is constant 7 in Derby)
#
derby.module.jdbcJ6=org.apache.derby.jdbc.Driver40
derby.env.jdk.jdbcJ6=7
derby.env.classes.jdbcJ6=java.sql.Driver
cloudscape.config.jdbcJ6=derby

# jdbc42 - requires JDK 1.8 (which is constant 9 in Derby)
#
derby.module.jdbcJ8=org.apache.derby.jdbc.Driver42
derby.env.jdk.jdbcJ8=9
derby.env.classes.jdbcJ8=java.sql.Driver
cloudscape.config.jdbcJ8=derby

# resourceAdapter - requires JDK 1.2, JTA classes and JDBC20X classes
#
derby.module.resourceAdapterJ2=org.apache.derby.jdbc.ResourceAdapterImpl
derby.env.jdk.resourceAdapterJ2=2
derby.env.classes.resourceAdapterJ2=javax.transaction.xa.Xid,javax.transaction.xa.XAResource,javax.transaction.xa.XAException,javax.sql.DataSource,javax.sql.ConnectionPoolDataSource,javax.sql.PooledConnection,javax.sql.XAConnection,javax.sql.XADataSource
cloudscape.config.resourceAdapterJ2=derby

derby.module.streams=org.apache.derby.impl.services.stream.SingleStream
cloudscape.config.streams=all

#####################################################
# Domain
#####################################################

derby.module.NoneAuthentication=org.apache.derby.impl.jdbc.authentication.NoneAuthenticationServiceImpl
cloudscape.config.NoneAuthentication=all

#
# Authentication Service - Various Authentication Services/Schemes
# (activated by derby.connection.requireAuthentication)
#
derby.module.nativeAuthentication=org.apache.derby.impl.jdbc.authentication.NativeAuthenticationServiceImpl
cloudscape.config.nativeAuthentication=derby

derby.module.basicAuthentication=org.apache.derby.impl.jdbc.authentication.BasicAuthenticationServiceImpl
cloudscape.config.basicAuthentication=derby

derby.module.specificAuthentication=org.apache.derby.impl.jdbc.authentication.SpecificAuthenticationServiceImpl
cloudscape.config.specificAuthentication=derby

derby.module.JNDIAuthentication=org.apache.derby.impl.jdbc.authentication.JNDIAuthenticationService
derby.env.classes.JNDIAuthentication=javax.naming.directory.InitialDirContext
cloudscape.config.JNDIAuthentication=derby

#####################################################
# Datatypes
#####################################################

derby.module.tcf=org.apache.derby.impl.sql.compile.TypeCompilerFactoryImpl
cloudscape.config.tcf=all

#####################################################
# Database Language
#####################################################

derby.module.database=org.apache.derby.impl.db.BasicDatabase
cloudscape.config.database=all

derby.module.database.slave=org.apache.derby.impl.db.SlaveDatabase
cloudscape.config.database.slave=all

derby.module.lf=org.apache.derby.impl.sql.GenericLanguageFactory
cloudscape.config.lf=all


# to use this module, either do not set derby.language.statementCache,
# or set it to something other than "true" (case-insensitive)
derby.module.lcf=org.apache.derby.impl.sql.conn.GenericLanguageConnectionFactory
cloudscape.config.lcf=all


derby.module.dataDictionary=org.apache.derby.impl.sql.catalog.DataDictionaryImpl
cloudscape.config.dataDictionary=all

derby.module.nodeFactory=org.apache.derby.impl.sql.compile.NodeFactoryImpl
cloudscape.config.nodeFactory=all

derby.module.ef=org.apache.derby.impl.sql.execute.GenericExecutionFactory
cloudscape.config.ef=all

derby.module.resultSetStatisticsFactory=org.apache.derby.impl.sql.execute.RealResultSetStatisticsFactory
#
#cloudscape.config.resultSetStatisticsFactory=derby
#
cloudscape.config.resultSetStatisticsFactory=all

derby.module.XPLAINFactory=org.apache.derby.impl.sql.execute.xplain.XPLAINFactory
#
#cloudscape.config.xplainFactory=derby
#
cloudscape.config.XPLAINFactory=all


derby.module.optimizer=org.apache.derby.impl.sql.compile.Level2OptimizerFactoryImpl
#
# cloudscape.config.optimizer=derby
#
cloudscape.config.optimizer=all

# use level1 optimizer for small configurations
#
# can't do this in the codeline because with 2 implementations, it is entirely
# by chance which get picked.  So we may be running with different modules
# depending on which jdk
#
# to be resolve by Siuling and Dan
#
#derby.module.optimizerSmall=org.apache.derby.impl.sql.compile.OptimizerFactoryImpl
#cloudscape.config.optimizerSmall=cloud,cloudtarget


#####################################################
# Database Property Validation
#####################################################
derby.module.validation=org.apache.derby.iapi.services.property.PropertyValidation
cloudscape.config.validation=all

#####################################################
# Database Storage
#####################################################

derby.module.access.heap=org.apache.derby.impl.store.access.heap.HeapConglomerateFactory
cloudscape.config.access.heap=all

derby.module.access.btree=org.apache.derby.impl.store.access.btree.index.B2IFactory
cloudscape.config.access.btree=all

derby.module.access.sort=org.apache.derby.impl.store.access.sort.ExternalSortFactory
cloudscape.config.access.sort=all

derby.module.access.uniquewithduplicatenullssort=org.apache.derby.impl.store.access.sort.UniqueWithDuplicateNullsExternalSortFactory
cloudscape.config.access.uniquewithduplicatenullssort=all

derby.module.access=org.apache.derby.impl.store.access.RllRAMAccessManager
cloudscape.config.access=all

# store data using a StorageFactory
# Enhanced version using NIO API; requires Java 1.4
derby.module.rawStore.data.genericJ4=org.apache.derby.impl.store.raw.data.BaseDataFileFactoryJ4
derby.env.jdk.rawStore.data.genericJ4=4
derby.env.classes.rawStore.data.genericJ4=java.nio.Buffer
cloudscape.config.rawStore.data.genericJ4=derby

# Generic version using older IO interfaces
derby.module.rawStore.data.genericJ1=org.apache.derby.impl.store.raw.data.BaseDataFileFactory
derby.env.jdk.rawStore.data.genericJ1=1
cloudscape.config.rawStore.data.genericJ1=derby

# Log to a file
derby.module.rawStore.log=org.apache.derby.impl.store.raw.log.LogToFile
cloudscape.config.rawStore.log=derby

derby.module.rawStore.transactionJ1=org.apache.derby.impl.store.raw.xact.XactFactory
derby.env.jdk.rawStore.transactionJ1=1
cloudscape.config.rawStore.transactionJ1=derby

derby.module.rawStore.transactionJ6=org.apache.derby.impl.store.raw.xact.ConcurrentXactFactory
derby.env.jdk.rawStore.transactionJ6=6
derby.env.classes.rawStore.transactionJ6=java.util.concurrent.ConcurrentHashMap
cloudscape.config.rawStore.transactionJ6=derby

derby.module.rawStore=org.apache.derby.impl.store.raw.RawStore
cloudscape.config.rawStore=derby

# Replication Master
derby.module.replication.master=org.apache.derby.impl.store.replication.master.MasterController
cloudscape.config.replication.master=derby
# Replication Slave
derby.module.replication.slave=org.apache.derby.impl.store.replication.slave.SlaveController
cloudscape.config.replication.slave=derby

#
# Support for read-only databases
#
# read only log
derby.module.rawStore.log.readonly=org.apache.derby.impl.store.raw.log.ReadOnly
cloudscape.config.rawStore.log.readonly=derby

#

derby.module.netServer.autoStart=org.apache.derby.iapi.jdbc.DRDAServerStarter
cloudscape.config.netServer.autoStart=derby


# DataValueFactory implementations
derby.module.dvfJ2=org.apache.derby.iapi.types.J2SEDataValueFactory
derby.env.jdk.dvfJ2=2
derby.env.classes.dvfJ2=java.math.BigDecimal,java.sql.Driver
cloudscape.config.dvfJ2=derby

derby.module.mgmt.jmx=org.apache.derby.impl.services.jmx.JMXManagementService
derby.env.jdk.mgmt.jmx=6
cloudscape.config.mgmt.jmx=derby

derby.module.mgmt.null=org.apache.derby.impl.services.jmxnone.NoManagementService
cloudscape.config.mgmt.null=derby

# Modules used on J2ME only
derby.module.dvfCDC=org.apache.derby.iapi.types.CDCDataValueFactory
cloudscape.config.dvfCDC=derby
derby.module.jdbc169=org.apache.derby.jdbc.Driver169
derby.env.classes.jdbc169=javax.sql.DataSource
cloudscape.config.jdbc169=derby
