roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r551351 - in /roller/trunk: apps/planet/src/java/META-INF/ apps/planet/src/java/org/apache/roller/planet/business/hibernate/ apps/planet/web/WEB-INF/classes/ tools/roller-planet/
Date Wed, 27 Jun 2007 22:07:42 GMT
Author: agilliland
Date: Wed Jun 27 15:07:41 2007
New Revision: 551351

URL: http://svn.apache.org/viewvc?view=rev&rev=551351
Log:
we actually want to use the addProperties() method to include custom hibernate props in the
persistence strategy because mergeProperties() only sets props that haven't been set before.
 we can also set properties which don't really need to be set by users, such as the hibernate
connection provider, directly in the hibernate config file.

updating planet integration jar with these changes.


Modified:
    roller/trunk/apps/planet/src/java/META-INF/planet-hibernate.cfg.xml
    roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePersistenceStrategy.java
    roller/trunk/apps/planet/web/WEB-INF/classes/planet.properties
    roller/trunk/tools/roller-planet/roller-planet-business.jar

Modified: roller/trunk/apps/planet/src/java/META-INF/planet-hibernate.cfg.xml
URL: http://svn.apache.org/viewvc/roller/trunk/apps/planet/src/java/META-INF/planet-hibernate.cfg.xml?view=diff&rev=551351&r1=551350&r2=551351
==============================================================================
--- roller/trunk/apps/planet/src/java/META-INF/planet-hibernate.cfg.xml (original)
+++ roller/trunk/apps/planet/src/java/META-INF/planet-hibernate.cfg.xml Wed Jun 27 15:07:41
2007
@@ -29,8 +29,10 @@
         
         <property name="show_sql">false</property>
         
-        <!-- use thread local Session context -->
-        <!--<property name="hibernate.current_session_context_class">thread</property>-->
+        <!-- use custom connection provider -->
+        <property name="hibernate.connection.provider_class">org.apache.roller.planet.business.hibernate.HibernateConnectionProvider</property>
+        
+        <!-- use custom thread local Session context -->
         <property name="hibernate.current_session_context_class">org.apache.roller.planet.business.hibernate.ThreadLocalSessionContextNoAutoClose</property>
 
         <!-- Hibernate L2 Caching -->

Modified: roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePersistenceStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePersistenceStrategy.java?view=diff&rev=551351&r1=551350&r2=551351
==============================================================================
--- roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePersistenceStrategy.java
(original)
+++ roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePersistenceStrategy.java
Wed Jun 27 15:07:41 2007
@@ -30,6 +30,7 @@
 import org.hibernate.cfg.Configuration;
 import org.apache.roller.planet.config.PlanetConfig;
 
+
 /**
  * Base class for Hibernate persistence implementation.
  *
@@ -64,7 +65,7 @@
                 props.setProperty(key, value);
             }
         }
-        config.mergeProperties(props);
+        config.addProperties(props);
         
         sessionFactory = config.buildSessionFactory(); 
     }

Modified: roller/trunk/apps/planet/web/WEB-INF/classes/planet.properties
URL: http://svn.apache.org/viewvc/roller/trunk/apps/planet/web/WEB-INF/classes/planet.properties?view=diff&rev=551351&r1=551350&r2=551351
==============================================================================
--- roller/trunk/apps/planet/web/WEB-INF/classes/planet.properties (original)
+++ roller/trunk/apps/planet/web/WEB-INF/classes/planet.properties Wed Jun 27 15:07:41 2007
@@ -64,8 +64,6 @@
 
 # Hibernate settings
 hibernate.dialect=org.hibernate.dialect.MySQLDialect
-hibernate.connection.provider_class=\
-org.apache.roller.planet.business.hibernate.HibernateConnectionProvider
 
 
 #----------------------------------------------------

Modified: roller/trunk/tools/roller-planet/roller-planet-business.jar
URL: http://svn.apache.org/viewvc/roller/trunk/tools/roller-planet/roller-planet-business.jar?view=diff&rev=551351&r1=551350&r2=551351
==============================================================================
Binary files - no diff available.



Mime
View raw message