[jboss-cvs] jboss-portal/core/src/resources/portal-cms-sar/conf/hibernate/cms ...

Julien Viet julien at jboss.com
Mon Jul 31 17:43:03 EDT 2006


  User: julien  
  Date: 06/07/31 17:43:03

  Modified:    core/src/resources/portal-cms-sar/conf/hibernate/cms  
                        domain.hbm.xml hibernate.cfg.xml
  Log:
  - add CacheableBlobUserType
  - make the jackrabbit PM use CacheableUserType to avoid 10000 request per page view to the DB
  
  Revision  Changes    Path
  1.2       +22 -11    jboss-portal/core/src/resources/portal-cms-sar/conf/hibernate/cms/domain.hbm.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: domain.hbm.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/core/src/resources/portal-cms-sar/conf/hibernate/cms/domain.hbm.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- domain.hbm.xml	11 Jul 2006 13:59:01 -0000	1.1
  +++ domain.hbm.xml	31 Jul 2006 21:43:03 -0000	1.2
  @@ -4,6 +4,7 @@
      "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
   <hibernate-mapping>
      <class name="org.jboss.portal.cms.hibernate.state.VersionBinVal" table="jbp_cms_version_binval" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -18,11 +19,12 @@
         <property
               name="data"
               column="BINVAL_DATA"
  -            type="blob"
  +            type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
               length="100000000"
               not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.state.VersionNode" table="jbp_cms_version_node" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -37,11 +39,12 @@
         <property
               name="data"
               column="NODE_DATA"
  -            type="blob"
  +            type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
               length="100000000"
               not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.state.VersionProp" table="jbp_cms_version_prop" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -56,11 +59,12 @@
         <property
               name="data"
               column="PROP_DATA"
  -            type="blob"
  +            type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
               length="100000000"
               not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.state.VersionRefs" table="jbp_cms_version_refs" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -75,11 +79,12 @@
         <property
               name="data"
               column="REFS_DATA"
  -            type="blob"
  +            type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
               length="100000000"
               not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.state.WSPBinVal" table="jbp_cms_wsp_binval" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -94,11 +99,12 @@
         <property
               name="data"
               column="BINVAL_DATA"
  -            type="blob"
  +            type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
               length="100000000"
               not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.state.WSPNode" table="jbp_cms_wsp_node" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -113,11 +119,12 @@
         <property
               name="data"
               column="NODE_DATA"
  -            type="blob"
  +            type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
               length="100000000"
               not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.state.WSPProp" table="jbp_cms_wsp_prop" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -132,11 +139,12 @@
         <property
               name="data"
               column="PROP_DATA"
  -            type="blob"
  +            type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
               length="100000000"
               not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.state.WSPRefs" table="jbp_cms_wsp_refs" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -151,11 +159,12 @@
         <property
               name="data"
               column="REFS_DATA"
  -            type="blob"
  +            type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
               length="100000000"
               not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.CMSEntry" table="jbp_cms_cmsentry" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -175,7 +184,7 @@
                   length="245"/>
         <property name="data"
                   column="FSENTRY_DATA"
  -                type="blob"
  +                type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
                   length="100000000"
                   not-null="false"/>
         <property name="lastmod"
  @@ -188,6 +197,7 @@
                   not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.RepositoryEntry" table="jbp_cms_repositoryentry" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -207,7 +217,7 @@
                   length="245"/>
         <property name="data"
                   column="FSENTRY_DATA"
  -                type="blob"
  +                type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
                   length="100000000"
                   not-null="false"/>
         <property name="lastmod"
  @@ -220,6 +230,7 @@
                   not-null="true"/>
      </class>
      <class name="org.jboss.portal.cms.hibernate.VersionEntry" table="jbp_cms_versionentry" lazy="true">
  +      <cache usage="read-write"/>
         <id
               name="key"
               column="PK"
  @@ -239,7 +250,7 @@
                   length="245"/>
         <property name="data"
                   column="FSENTRY_DATA"
  -                type="blob"
  +                type="org.jboss.portal.jems.hibernate.CacheableBlobUserType"
                   length="100000000"
                   not-null="false"/>
         <property name="lastmod"
  
  
  
  1.2       +1 -1      jboss-portal/core/src/resources/portal-cms-sar/conf/hibernate/cms/hibernate.cfg.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: hibernate.cfg.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/core/src/resources/portal-cms-sar/conf/hibernate/cms/hibernate.cfg.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- hibernate.cfg.xml	11 Jul 2006 13:59:01 -0000	1.1
  +++ hibernate.cfg.xml	31 Jul 2006 21:43:03 -0000	1.2
  @@ -6,7 +6,7 @@
      <session-factory>
         <property name="connection.datasource">java:@portal.datasource.name@</property>
         <property name="show_sql">@portal.sql.show@</property>
  -      <property name="cache.use_second_level_cache">false</property>
  +      <property name="cache.use_second_level_cache">true</property>
         <property name="cache.use_query_cache">true</property>
   
         <!-- Force the dialect instead of using autodetection -->
  
  
  



More information about the jboss-cvs-commits mailing list