############################################################################### # Speedo: an implementation of JDO compliant personality on top of JORM generic # I/O sub-system. # Copyright (C) 2001-2004 France Telecom R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Contact: speedo@objectweb.org (users list) # or sebastien.chassande-barrioz@rd.francetelecom.com (project chief) # ############################################################################### # This file is the configuration file of Speedo. ############################################################################### # PersistenceManagerFactory # ############################################################################### # Class implementing the PersistenceManagerFactory interface. # Note: The real role of this class is to initialize the component architecture # (http://fractal.objectweb.org) of Speedo with the initial properies specified # in this file. The PersistenceManagerFactory role is delegated to the real # implementation (the SpeedoPersistenceManagerFactory class). # # This property must not be changed. It is used by the JDOHelper to knwon the # PersistenceManagerFactory class of the JDO driver. # javax.jdo.PersistenceManagerFactoryClass org.objectweb.speedo.jdo.JDOSpeedo ############################################################################### # Data Access # ############################################################################### # This section contains the configuration of the access to the data support. # # The first property (org.objectweb.speedo.mapperName) MUST be defined for the # enhancement time and the runtime. It characterizes the data source type. # # In a second part of this data access section, you must choose the way for # Speedo to reach the data support. The first mean is through a JDBC # driver and the second is through a connection factory. #==============================# # Data source type # #==============================# #mapper name corresponding to your data support type #the default value is 'rdb.hsql' # With 'rdb.automatic',Speedo tries to calculate # automaticaly the data source type. If the auto detection fails, you have to # choose one of the following values: # rdb.oracle, rdb.oracle8, rdb.mysql, rdb.postgres, rdb.sqlserver, rdb.firebird, # rdb.mckoi, rdb.sapdb, rdb.sybase, rdb.hsql # org.objectweb.speedo.mapperName rdb.hsql #org.objectweb.speedo.mapperName rdb.postgres #org.objectweb.speedo.mapperName rdb.mysql #org.objectweb.speedo.mapperName rdb.oracle # desactivation of the connectivity checking at speedo start up #org.objectweb.speedo.connection.check false #===============================================# # JDBC Driver directly (local transaction only) # #===============================================# #Driver class name #javax.jdo.option.ConnectionDriverName org.postgresql.Driver #javax.jdo.option.ConnectionDriverName oracle.jdbc.driver.OracleDriver #javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver #javax.jdo.option.ConnectionDriverName com.p6spy.engine.spy.P6SpyDriver javax.jdo.option.ConnectionDriverName org.hsqldb.jdbcDriver #url of the database #javax.jdo.option.ConnectionURL jdbc:postgresql:speedoTest #javax.jdo.option.ConnectionURL jdbc:oracle:thin:@g-rac1:1521:test1 #javax.jdo.option.ConnectionURL jdbc:mysql://localhost/speedoTest javax.jdo.option.ConnectionURL jdbc:hsqldb:hsql://localhost/xdb #user name #javax.jdo.option.ConnectionUserName john javax.jdo.option.ConnectionUserName sa #password of the user #javax.jdo.option.ConnectionPassword smith javax.jdo.option.ConnectionPassword # connection pool size #Minimal number of connection in the pool org.objectweb.speedo.connection.pool.min 0 #Maximal number of connection in the pool org.objectweb.speedo.connection.pool.max 100 # TTL of the connection in term of seconds (life of the connection) # 0 => no TTL (default) org.objectweb.speedo.connection.pool.ttl 3600 # TTL of the unused connection in term of seconds # 0 => no TTL (default) org.objectweb.speedo.connection.pool.inactivettl 300 #the max time to wait a free connection in millisecond org.objectweb.speedo.connection.pool.timeout 500 # Specify the mapping structure (ex SQL tables) management. The possibles # values are the following: # DO_NOTHING : nothing is done. Then the mapping structures already exist at # the Speedo starting # CREATE_IF_REQUIRED : The mapping structures are created if they are not # already present (default). # FORCE_CREATE: The mapping structures are removed (if they already exist), and # and created. # DELETE_DATA: The data present in the mapping structure are removed. Of course # if the mapping structure do not exist, they are created. # #org.objectweb.speedo.mappingStructure CREATE_IF_REQUIRED ############################################################################### # Locking management # ############################################################################### # Management of the concurrency # the property org.objectweb.speedo.transaction.locking indicate which is in # charge of the concurrency management. The concurrency can be manage by Speedo # or the database: # * speedo: Speedo manages the concurrency, the write access on the data # support must be done only by a single Speedo instance. It means this mode # does not support clustering or direct write accesses to the database. # * database: The database manages the concurrency, the clusterting or direct # write accesses to the database are possible. The drawback of this mode is # to remove the use of the L2 cache. It means data are loaded at each # transaction begin. # The possible values are 'speedo'(default) or 'database'. # #org.objectweb.speedo.transaction.locking database # Indicates if transaction are optimisitic or pessimitic. In the optimisitic # case several threads can use a same persistent object. In case of optimistic # transaction, each persistent object has several state: one for each user # (thread). The default case is pessimistic (false). # #javax.jdo.option.Optimistic true # In case of Speedo is in charge of the concurrency management and the # concurrency policy is set to pessimitic, this option defines the locking # policy on persistant instance: # * rw : parallel reader are permit, but a writer is alone to use the resource, # * mutex : the access is exclusif. # # In all case the resource access is FIFO. # The possible values are 'rw' (default) or 'mutex'. # #org.objectweb.speedo.transaction.locking.pessimistic.policy mutex # In case of Speedo is in charge of the concurrency management, this option # defines if speedo allows the thin locking level management. A thin locking # level is the management of the locking at class field or collection element # level. The interest of this thin locking is to permit concurrent modification # on a presistent instance (class or collection) but on different fields or # elements. # If you enable the thin locking level, you can specify for which collections # or class the thin locking level must be used. To do this use the properties # org.objectweb.speedo.transaction.locking.level({field}). # The possible values are 'true' or 'false'(default). # #org.objectweb.speedo.transaction.locking.level.thin false #In case of Speedo is in charge of the concurrency management, this option # defines the locking level for a particular collection identified by its fully # qualified path such as the following examples: # * org.objectweb.speedo.transaction.locking.level(com.foo.Bar#*) = field # * org.objectweb.speedo.transaction.locking.level(com.foo.Bar#myCollection) = instance # # Here is the possible values: # * instance: the locking level is the persistent instances # * field : the locking level can the element of collections (or list or set # or map). Be careful to this locking level because it permits concurrent # modification of the same collection if accessed elements are different. # # org.objectweb.speedo.transaction.locking.level(com.foo.Bar#myCollection) ############################################################################### # Memory Cache Management # ############################################################################### # Memory cache size org.objectweb.speedo.cache.size 10000 # When the cache is full or when the treshold is reached this property indicates # how many entry must be tried to free. The possible values are absolute # value (234) or a percent of the maximal cache size (12%). The default # value is 7%. org.objectweb.speedo.cache.autoCleanSize 2% # Is the number of entries since the cache must try to evict entries. The number # of entries to evict is specified by the 'autoCleanSize' property. The possible # values are absolute value (234) or a percent of the maximal cache size (75%). # By default there is no threshold, then there is no auto cleaning process. org.objectweb.speedo.cache.autoCleanThreshold 0 # Replacement politic of the cache: LRU, MRU or FIFO # The default value is LRU org.objectweb.speedo.cache.policy LRU #Cache behavior with regarrds to classes # the property 'org.objectweb.speedo.cache.classPolicy()' defines # the cache behavior for a class. The possible behavior are the following: # - 'cache' : indicates that the class instances are put in cache. # - 'nocache' : indicates that the class instances are not put in cache. # - 'fixed' : indicates that the class instances are put in cache and fixed. A # fixed instance is not evicted from the cache until it was deleted. # - 'all' : indicates that ALL instances of a classes are put in cache and # fixed. At the class initialization time, Speedo loads all instance # of the class. One of the advantage is to avoid I/O on extent. # When the cache is turned off, it only desactivates the cache process. The # cache component is still part of the Speedo architecture and cache entries # are still instanciated (the objects are always read from the database). As # a consequence you still need to configure the properties listed below for # the cache management. However it is possible to desactive complety the cache # usage by desactivating the java instance sharing (see the # 'org.objectweb.speedo.shareable' property in this file). # #Example: #org.objectweb.speedo.cache.classPolicy(com.foo.Bar) nocache # Indicates if queries and extends must ingore the instance modified in memory # and not yet committed into the support. The default value is false (the # modified instance are flushed into the support before queries). # javax.jdo.option.IgnoreCache false # when a transaction is committed this property specifies if the modified # persistent object must be kept in the memory cache. The default value is true # (persistent objects are kept). # #javax.jdo.option.RetainValues false # when a transaction is rolledback this property specifies if the modified # persistent object must be reload from the database. The default value is false # (dirty objects are NOT reload immediatly). # #javax.jdo.option.RestoreValues false #user-cache activation # An user cache is a view of the L2 memory cache indexed my a secondary key on # persistent instance. You have to declare field used as index in the .jdo files # and to activate the user caches. To this last action, you have to add in this # file a property following this pattern: #org.objectweb.speedo.user-cache.classPolicy() # Examples: # org.objectweb.speedo.user-cache.classPolicy(*) * # org.objectweb.speedo.user-cache.classPolicy(*.Bar) myCache1,myCache2 # For more details see the speedo documentation. ############################################################################### # PersistenceManager Pools configuration # ############################################################################### # In Speedo, the PersistenceManager instances are pooled. # # Size of the pool of PersistenceManager instances # Minimal size org.objectweb.speedo.persistencemanager.pool.min 0 #Maximal size org.objectweb.speedo.persistencemanager.pool.max 100 #Time to live of the instance (in second) org.objectweb.speedo.persistencemanager.pool.ttl 3600 #Time to live of the unused instance (in second) org.objectweb.speedo.persistencemanager.pool.ttl 300 #the max time to wait a free persistence manager (in millisecond) org.objectweb.speedo.persistencemanager.pool.timeout 1000 ############################################################################### # Compiled query Cache Management # ############################################################################### # Memory cache size in term of number of persistent objects org.objectweb.speedo.compiledquery.cache.size 100 # When the cache is full or when the treshold is reached this property indicates # how many entry must be tried to free. The possible values are absolute # value (234) or a percent of the maximal cache size (12%). The default # value is 7%. org.objectweb.speedo.compiledquery.cache.autoCleanSize 7% # Is the number of entries since the cache must try to evict entries. The number # of entries to evict is specified by the 'autoCleanSize' property. The possible # values are absolute value (234) or a percent of the maximal cache size (75%). # By default there is no threshold, then there is no auto cleaning process. #org.objectweb.speedo.compiledquery.cache.autoCleanThreshold 80% # Replacement politic of the cache: LRU, MRU or FIFO # The default value is LRU org.objectweb.speedo.compiledquery.cache.policy LRU ############################################################################### # Data Prefetching Management # ############################################################################### #Activation of the data prefetching on queries #the default value is 'on' #org.objectweb.speedo.query.prefetch.query(com.foo.Bar) #org.objectweb.speedo.query.prefetch.query off #Activation of the data prefetching on extents #the default value is 'on' #org.objectweb.speedo.query.prefetch.extent(com.foo.Bar) #org.objectweb.speedo.query.prefetch.extent off #Activation of the data prefetching on collection loading #the default value is 'on' #org.objectweb.speedo.genclass.prefetch off #org.objectweb.speedo.genclass.prefetch(com.foo.Bar) ############################################################################### # Others # ############################################################################### # To activate the debug mode #org.objectweb.speedo.debug true # This property permits to the user to listen the transaction life cycle in # implementing the TransactionListener interface provided in Speedo. However # Speedo provides a simple implementation calculating statistics. To active the # use of a listener, you simply have to specify the implementation of the # interface. #org.objectweb.speedo.txListener org.objectweb.speedo.workingset.lib.WorkingSetStatistic #org.objectweb.speedo.txListener org.objectweb.speedo.workingset.lib.TxObserverImpl # Indicates if several threads can manipulate a same PersistenceManager instance # in same time (concurrency). The default value is false (no additionnal # synchronization for concurrent access to a PersistentManager instance). #javax.jdo.option.Multithreaded false # Read operation out of a transaction is always allowed #javax.jdo.option.NontransactionalRead true # Write operation out of a transaction is always allowed #javax.jdo.option.NontransactionalWrite true #To activate the HTTP console of Speedo #org.objectweb.speedo.jmx on #To choose the HTTP port of the Speedo console #org.objectweb.speedo.jmx.http.port 8083 # Speedo offers a special feature permitting to share the java persistent # instances. This means in a JVM, there is only one java instance corresponding # to an identifier of a persistent data. The interests are firstly to permit the # exchange of java object between threads/transactions, secondly to avoid # the creation of java object for each transaction and finally to be close to # the java programming model. To manage this feature, Speedo extracts the # persistent fields into another instance (StateItf). The java object sharing # is assumed thanks to the L2 cache. Indeed it contains a persistent object and # maybe the state too. By default this feature is activated. This is the reason # why even if the cache is desactivate, the L2 cache is used for the sharing of # java object but not for the caching apsect. The different ways to desactivate # this feature are the following # - use the property org.objectweb.speedo.shareable in order to desactivate # the sharing for all persistent classes. # - use the property org.objectweb.speedo.shareable() # in order to desactivate the sharing for some persistent classes. # examples: #org.objectweb.speedo.shareable false #org.objectweb.speedo.shareable(*) false #org.objectweb.speedo.shareable(com.foo.Bar*) false