[Commits] (bcm) maintain hibernate mapping file manually. cache all collections as well as

commits at osafoundation.org commits at osafoundation.org
Tue Apr 12 15:57:38 PDT 2005


Commit by: bcm
Modified files:
server/core/build.xml 1.15 1.16
server/core/etc/hibernate.cfg.xml None 1.1
server/core/etc/ehcache.xml 1.2 1.3
server/core/src/org/osaf/cosmo/model/Role.java 1.1 1.2
server/core/src/org/osaf/cosmo/model/User.java 1.2 1.3
server/docs/TODO.txt 1.49 1.50
server/etc/log4j.xml 1.3 1.4

Log message:
maintain hibernate mapping file manually. cache all collections as well as
classes.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/server/core/build.xml.diff?r1=text&tr1=1.15&r2=text&tr2=1.16
http://cvs.osafoundation.org/index.cgi/server/core/etc/hibernate.cfg.xml?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.osafoundation.org/index.cgi/server/core/etc/ehcache.xml.diff?r1=text&tr1=1.2&r2=text&tr2=1.3
http://cvs.osafoundation.org/index.cgi/server/core/src/org/osaf/cosmo/model/Role.java.diff?r1=text&tr1=1.1&r2=text&tr2=1.2
http://cvs.osafoundation.org/index.cgi/server/core/src/org/osaf/cosmo/model/User.java.diff?r1=text&tr1=1.2&r2=text&tr2=1.3
http://cvs.osafoundation.org/index.cgi/server/docs/TODO.txt.diff?r1=text&tr1=1.49&r2=text&tr2=1.50
http://cvs.osafoundation.org/index.cgi/server/etc/log4j.xml.diff?r1=text&tr1=1.3&r2=text&tr2=1.4

Index: server/core/etc/ehcache.xml
diff -u server/core/etc/ehcache.xml:1.2 server/core/etc/ehcache.xml:1.3
--- server/core/etc/ehcache.xml:1.2	Fri Apr  8 16:53:16 2005
+++ server/core/etc/ehcache.xml	Tue Apr 12 15:57:36 2005
@@ -12,9 +12,19 @@
          overflowToDisk="true" timeToIdleSeconds="300"
          timeToLiveSeconds="300" diskPersistent="false"
          diskExpiryThreadIntervalSeconds="120"/>
+  <cache name="org.osaf.cosmo.model.Role.users"
+         eternal="false" maxElementsInMemory="100000"
+         overflowToDisk="true" timeToIdleSeconds="300"
+         timeToLiveSeconds="300" diskPersistent="false"
+         diskExpiryThreadIntervalSeconds="120"/>
   <cache name="org.osaf.cosmo.model.User"
          eternal="false" maxElementsInMemory="100000"
          overflowToDisk="true" timeToIdleSeconds="300"
          timeToLiveSeconds="300" diskPersistent="false"
          diskExpiryThreadIntervalSeconds="120"/>
+  <cache name="org.osaf.cosmo.model.User.roles"
+         eternal="false" maxElementsInMemory="100000"
+         overflowToDisk="true" timeToIdleSeconds="300"
+         timeToLiveSeconds="300" diskPersistent="false"
+         diskExpiryThreadIntervalSeconds="120"/>
 </ehcache>

Index: server/etc/log4j.xml
diff -u server/etc/log4j.xml:1.3 server/etc/log4j.xml:1.4
--- server/etc/log4j.xml:1.3	Wed Apr  6 20:15:01 2005
+++ server/etc/log4j.xml	Tue Apr 12 15:57:37 2005
@@ -23,10 +23,6 @@
   </logger>
 -->
 
-  <logger name="net.sf.ehcache.CacheManager">
-    <level value="ERROR"/>
-  </logger>
-
   <logger name="org.apache">
     <level value="WARN"/>
   </logger>

Index: server/core/src/org/osaf/cosmo/model/Role.java
diff -u server/core/src/org/osaf/cosmo/model/Role.java:1.1 server/core/src/org/osaf/cosmo/model/Role.java:1.2
--- server/core/src/org/osaf/cosmo/model/Role.java:1.1	Fri Apr  8 16:53:24 2005
+++ server/core/src/org/osaf/cosmo/model/Role.java	Tue Apr 12 15:57:36 2005
@@ -9,7 +9,6 @@
 
 /**
  * @hibernate.class table="role"
- * @hibernate.cache usage="read-write"
  */
 public class Role extends BaseModelObject {
 

Index: server/core/build.xml
diff -u server/core/build.xml:1.15 server/core/build.xml:1.16
--- server/core/build.xml:1.15	Mon Apr 11 17:13:28 2005
+++ server/core/build.xml	Tue Apr 12 15:57:36 2005
@@ -50,8 +50,6 @@
         <include name="**/*.java"/>
       </fileset>
       <hibernate version="2.0"/>
-      <hibernatecfg dataSource="${cosmo.dist.userdb.dataSource}"
-                    dialect="${cosmo.dist.userdb.dialect}"/>
     </hibernatedoclet>
   </target>
 
@@ -66,9 +64,19 @@
   </target>
 
   <target name="pack-jar" description="pack the jar">
+    <copy todir="${core.build}/classes"
+          file="${core.etc}/hibernate.cfg.xml">
+      <filterset>
+        <filter token="DATASOURCE"
+                value="${cosmo.dist.userdb.dataSource}"/>
+        <filter token="DIALECT"
+                value="${cosmo.dist.userdb.dialect}"/>
+      </filterset>
+    </copy>
     <jar destfile="${core.build}/cosmo-core.jar"
          basedir="${core.build}/classes">
       <fileset dir="${core.etc}">
+        <exclude name="hibernate.cfg.xml"/>
         <include name="*.xml"/>
       </fileset>
     </jar>

Index: server/core/src/org/osaf/cosmo/model/User.java
diff -u server/core/src/org/osaf/cosmo/model/User.java:1.2 server/core/src/org/osaf/cosmo/model/User.java:1.3
--- server/core/src/org/osaf/cosmo/model/User.java:1.2	Tue Apr 12 14:58:23 2005
+++ server/core/src/org/osaf/cosmo/model/User.java	Tue Apr 12 15:57:36 2005
@@ -9,7 +9,6 @@
 
 /**
  * @hibernate.class table="user"
- * @hibernate.cache usage="read-write"
  */
 public class User extends BaseModelObject {
 

Index: server/docs/TODO.txt
diff -u server/docs/TODO.txt:1.49 server/docs/TODO.txt:1.50
--- server/docs/TODO.txt:1.49	Tue Apr 12 14:58:23 2005
+++ server/docs/TODO.txt	Tue Apr 12 15:57:37 2005
@@ -6,7 +6,8 @@
 
  * don't pack hibernate config file in jar and place it somewhere a
    cosmo admin can find it to tweak the dialect
- * cache hibernate collections
+ * make pk of user and role tables a long id rather than name (but
+   keep that col indexed)
 
 docs:
 
@@ -43,6 +44,7 @@
  * icons on user list for root users
  * see if we can't get Struts to work with "/user/bcm/update" rather
    than "/user/update.do" with "username=bcm" in content body
+ * use Sitemesh to provide layout decoration rather than Tiles?
  * bring tests up to date
 
 webdav:



More information about the Commits mailing list