protected void load ( ) { // properties file may be set as a System property. // if no property is set take default name. String fn = System . getProperty ( OJB_PROPERTIES_FILE , OJB_PROPERTIES_FILE ) ; setFilename ( fn ) ; super . load ( ) ; // default repository & connection descriptor file repositoryFilename = getString ( "repositoryFile" , OJB_METADATA_FILE ) ; // object cache class objectCacheClass = getClass ( "ObjectCacheClass" , ObjectCacheDefaultImpl . class , ObjectCache . class ) ; // load PersistentField Class persistentFieldClass = getClass ( "PersistentFieldClass" , PersistentFieldDirectImpl . class , PersistentField . class ) ; // load PersistenceBroker Class persistenceBrokerClass = getClass ( "PersistenceBrokerClass" , PersistenceBrokerImpl . class , PersistenceBroker . class ) ; // load ListProxy Class listProxyClass = getClass ( "ListProxyClass" , ListProxyDefaultImpl . class ) ; // load SetProxy Class setProxyClass = getClass ( "SetProxyClass" , SetProxyDefaultImpl . class ) ; // load CollectionProxy Class collectionProxyClass = getClass ( "CollectionProxyClass" , CollectionProxyDefaultImpl . class ) ; // load IndirectionHandler Class indirectionHandlerClass = getClass ( "IndirectionHandlerClass" , IndirectionHandlerJDKImpl . class , IndirectionHandler . class ) ; // load ProxyFactory Class proxyFactoryClass = getClass ( "ProxyFactoryClass" , ProxyFactoryJDKImpl . class , ProxyFactory . class ) ; // load configuration for ImplicitLocking parameter: useImplicitLocking = getBoolean ( "ImplicitLocking" , false ) ; // load configuration for LockAssociations parameter: lockAssociationAsWrites = ( getString ( "LockAssociations" , "WRITE" ) . equalsIgnoreCase ( "WRITE" ) ) ; // load OQL Collection Class oqlCollectionClass = getClass ( "OqlCollectionClass" , DListImpl . class , ManageableCollection . class ) ; // set the limit for IN-sql , -1 for no limits sqlInLimit = getInteger ( "SqlInLimit" , - 1 ) ; //load configuration for PB pool maxActive = getInteger ( PoolConfiguration . MAX_ACTIVE , PoolConfiguration . DEFAULT_MAX_ACTIVE ) ; maxIdle = getInteger ( PoolConfiguration . MAX_IDLE , PoolConfiguration . DEFAULT_MAX_IDLE ) ; maxWait = getLong ( PoolConfiguration . MAX_WAIT , PoolConfiguration . DEFAULT_MAX_WAIT ) ; timeBetweenEvictionRunsMillis = getLong ( PoolConfiguration . TIME_BETWEEN_EVICTION_RUNS_MILLIS , PoolConfiguration . DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS ) ; minEvictableIdleTimeMillis = getLong ( PoolConfiguration . MIN_EVICTABLE_IDLE_TIME_MILLIS , PoolConfiguration . DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS ) ; whenExhaustedAction = getByte ( PoolConfiguration . WHEN_EXHAUSTED_ACTION , PoolConfiguration . DEFAULT_WHEN_EXHAUSTED_ACTION ) ; useSerializedRepository = getBoolean ( "useSerializedRepository" , false ) ; }
Loads the configuration from file OBJ . properties . If the system property OJB . properties is set then the configuration in that file is loaded . Otherwise the file OJB . properties is tried . If that is also unsuccessful then the configuration is filled with default values .