[jboss-cvs] jboss-seam/examples/wiki/src/etc ...

Christian Bauer christian at hibernate.org
Fri Apr 27 06:33:18 EDT 2007


  User: cbauer  
  Date: 07/04/27 06:33:18

  Modified:    examples/wiki/src/etc    wiki-prod-ds.xml wiki-dev-ds.xml
  Added:       examples/wiki/src/etc    ehcache.xml
  Log:
  Now deployable on 4.2 out-of-box (local Hibernate JARs) and optimized SQL and caching
  
  Revision  Changes    Path
  1.4       +15 -9     jboss-seam/examples/wiki/src/etc/wiki-prod-ds.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: wiki-prod-ds.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/etc/wiki-prod-ds.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- wiki-prod-ds.xml	21 Apr 2007 08:13:50 -0000	1.3
  +++ wiki-prod-ds.xml	27 Apr 2007 10:33:18 -0000	1.4
  @@ -7,6 +7,12 @@
         <driver-class>com.mysql.jdbc.Driver</driver-class>
         <user-name>test</user-name>
         <password></password>
  +
  +        <!-- This means it will be bound under "wikiDatasource", not "java:/wikiDatasource".
  +             Apparently this enables remote datasources, which I don't need. However, my
  +             local Hibernate in the WAR won't find the datasource if this setting is not present. -->
  +        <use-java-context>false</use-java-context>
  +
      </local-tx-datasource>
       
   </datasources>
  
  
  
  1.2       +15 -17    jboss-seam/examples/wiki/src/etc/wiki-dev-ds.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: wiki-dev-ds.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/etc/wiki-dev-ds.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- wiki-dev-ds.xml	7 Mar 2007 18:37:35 -0000	1.1
  +++ wiki-dev-ds.xml	27 Apr 2007 10:33:18 -0000	1.2
  @@ -7,14 +7,12 @@
         <driver-class>org.hsqldb.jdbcDriver</driver-class>
         <user-name>sa</user-name>
         <password></password>
  -<!-- 
  -      <exception-sorter-class-name>
  -         org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
  -      </exception-sorter-class-name>
  -      <metadata>
  -         <type-mapping>mySQL</type-mapping>
  -      </metadata>
  --->
  +
  +        <!-- This means it will be bound under "wikiDatasource", not "java:/wikiDatasource".
  +             Apparently this enables remote datasources, which I don't need. However, my
  +             local Hibernate in the WAR won't find the datasource if this setting is not present. -->
  +        <use-java-context>false</use-java-context>
  +
      </local-tx-datasource>
       
   </datasources>
  
  
  
  1.1      date: 2007/04/27 10:33:18;  author: cbauer;  state: Exp;jboss-seam/examples/wiki/src/etc/ehcache.xml
  
  Index: ehcache.xml
  ===================================================================
  <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd">
  
      <!--
      DiskStore configuration
  
      Sets the path to the directory where cache files are created.
  
      If the path is a Java System Property it is replaced by its value in the
      running VM.
  
      The following properties are translated:
      * user.home - User's home directory
      * user.dir - User's current working directory
      * java.io.tmpdir - Default temp file path
  
      Subdirectories can be specified below the property e.g. java.io.tmpdir/one
      -->
      <diskStore path="java.io.tmpdir"/>
  
  
      <!-- Cache configuration.
  
      The following attributes are required.
  
      name:
      Sets the name of the cache. This is used to identify the cache. It must be unique.
  
      maxElementsInMemory:
      Sets the maximum number of objects that will be created in memory
  
          maxElementsOnDisk:
      Sets the maximum number of objects that will be maintained in the DiskStore
          The default value is zero, meaning unlimited.
  
      eternal:
      Sets whether elements are eternal. If eternal,  timeouts are ignored and the
      element is never expired.
  
      overflowToDisk:
      Sets whether elements can overflow to disk when the memory store
      has reached the maxInMemory limit.
  
      The following attributes are optional.
  
      timeToIdleSeconds:
      Sets the time to idle for an element before it expires.
      i.e. The maximum amount of time between accesses before an element expires
      Is only used if the element is not eternal.
      Optional attribute. A value of 0 means that an Element can idle for infinity.
      The default value is 0.
  
      timeToLiveSeconds:
      Sets the time to live for an element before it expires.
      i.e. The maximum time between creation time and when an element expires.
      Is only used if the element is not eternal.
      Optional attribute. A value of 0 means that and Element can live for infinity.
      The default value is 0.
  
      diskPersistent:
      Whether the disk store persists between restarts of the Virtual Machine.
      The default value is false.
  
      diskExpiryThreadIntervalSeconds:
      The number of seconds between runs of the disk expiry thread. The default value
      is 120 seconds.
  
      memoryStoreEvictionPolicy:
      Policy would be enforced upon reaching the maxElementsInMemory limit. Default
      policy is Least Recently Used (specified as LRU). Other policies available -
      First In First Out (specified as FIFO) and Less Frequently Used
      (specified as LFU)
  
      -->
  
      <!--
      Mandatory Default Cache configuration. These settings will be applied to caches
      created programmtically using CacheManager.add(String cacheName)
      -->
      <defaultCache
              maxElementsInMemory="10000"
              eternal="false"
              timeToIdleSeconds="120"
              timeToLiveSeconds="120"
              overflowToDisk="false"
              maxElementsOnDisk="10000000"
              diskPersistent="false"
              diskExpiryThreadIntervalSeconds="120"
              memoryStoreEvictionPolicy="LRU"
              />
  
      <cache name="org.hibernate.cache.StandardQueryCache"
             maxElementsInMemory="100"
             eternal="false"
             overflowToDisk="false"
             timeToIdleSeconds="300"
             timeToLiveSeconds="600"
             diskPersistent="false"
             memoryStoreEvictionPolicy="LRU"/>
  
      <cache name="org.hibernate.cache.UpdateTimestampsCache"
             maxElementsInMemory="1000"
             eternal="true"
             diskPersistent="false"
             overflowToDisk="false"/>
  
      <cache name="WikiPreference"
             maxElementsInMemory="20000"
             eternal="false"
             overflowToDisk="false"
             timeToIdleSeconds="1000"
             timeToLiveSeconds="6000"
             diskPersistent="false"
             memoryStoreEvictionPolicy="LRU"/>
  
      <cache name="WikiNode"
             maxElementsInMemory="1000"
             eternal="false"
             overflowToDisk="false"
             timeToIdleSeconds="1000"
             timeToLiveSeconds="6000"
             diskPersistent="false"
             memoryStoreEvictionPolicy="LRU"/>
  
      <cache name="WikiLinkProtocol"
             maxElementsInMemory="50"
             eternal="false"
             overflowToDisk="false"
             timeToIdleSeconds="86400"
             timeToLiveSeconds="259200"
             diskPersistent="false"
             memoryStoreEvictionPolicy="LRU"/>
  
      <cache name="WikiFeed"
             maxElementsInMemory="100"
             eternal="false"
             overflowToDisk="false"
             timeToIdleSeconds="86400"
             timeToLiveSeconds="259200"
             diskPersistent="false"
             memoryStoreEvictionPolicy="LRU"/>
  
      <cache name="WikiFeedEntry"
             maxElementsInMemory="1000"
             eternal="false"
             overflowToDisk="false"
             timeToIdleSeconds="1000"
             timeToLiveSeconds="6000"
             diskPersistent="false"
             memoryStoreEvictionPolicy="LRU"/>
  
      <cache name="WikiFeedEntryCollection"
             maxElementsInMemory="5000"
             eternal="false"
             overflowToDisk="false"
             timeToIdleSeconds="1000"
             timeToLiveSeconds="6000"
             diskPersistent="false"
             memoryStoreEvictionPolicy="LRU"/>
  
      <cache name="WikiUser"
             maxElementsInMemory="5000"
             eternal="false"
             overflowToDisk="false"
             timeToIdleSeconds="10000"
             timeToLiveSeconds="60000"
             diskPersistent="false"
             memoryStoreEvictionPolicy="LRU"/>
  
      <cache name="WikiComment"
             maxElementsInMemory="2000"
             eternal="false"
             overflowToDisk="false"
             timeToIdleSeconds="86400"
             timeToLiveSeconds="259200"
             diskPersistent="false"
             memoryStoreEvictionPolicy="LRU"/>
  
  </ehcache>
  
  



More information about the jboss-cvs-commits mailing list