[jboss-svn-commits] JBL Code SVN: r7704 - in labs/jbossforums/trunk/forums/src: main/org/jboss/portlet/forums/impl resources/portal-forums-sar/conf/hibernate resources/portal-forums-war/WEB-INF

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Nov 18 07:46:43 EST 2006


Author: unibrew
Date: 2006-11-18 07:46:39 -0500 (Sat, 18 Nov 2006)
New Revision: 7704

Modified:
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
   labs/jbossforums/trunk/forums/src/resources/portal-forums-sar/conf/hibernate/hibernate.cfg.xml
   labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/web.xml
Log:
[JBFORUMS-139] Making JBoss Forums compatible with JBoss AS 4.0.5

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java	2006-11-18 12:32:45 UTC (rev 7703)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java	2006-11-18 12:46:39 UTC (rev 7704)
@@ -1302,7 +1302,6 @@
              query.setString("forumId", "" + forum.getId());
              query.setFirstResult(0);
              query.setMaxResults(1);
-             query.setCacheable(true);
              Post lastPost = (Post)query.uniqueResult();
              return lastPost;
           }
@@ -1353,7 +1352,6 @@
          query.setString("topicId", "" + topic.getId());
          query.setFirstResult(0);
          query.setMaxResults(1);
-         query.setCacheable(true);
          Post lastPost = (Post)query.uniqueResult();
          return lastPost;
       }

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-sar/conf/hibernate/hibernate.cfg.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-sar/conf/hibernate/hibernate.cfg.xml	2006-11-18 12:32:45 UTC (rev 7703)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-sar/conf/hibernate/hibernate.cfg.xml	2006-11-18 12:46:39 UTC (rev 7704)
@@ -1,26 +1,25 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!DOCTYPE hibernate-configuration PUBLIC
-   "-//Hibernate/Hibernate Configuration DTD//EN"
-   "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-<hibernate-configuration>
-   <session-factory>
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC
+   "-//Hibernate/Hibernate Configuration DTD//EN"
+   "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+   <session-factory>
       <property name="connection.datasource">java:@portal.datasource.name@</property>
-      <property name="hibernate.cache.use_query_cache">true</property>
-      <property name="show_sql">false</property>
-
-      <!-- Force the dialect instead of using autodetection -->
-      <!--
-      <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
-      -->
-
-      <!-- Mapping files -->
-      <mapping resource="org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml"/>
-      <mapping resource="org/jboss/portlet/forums/impl/ForumImpl.hbm.xml"/>
-      <mapping resource="org/jboss/portlet/forums/impl/PollImpl.hbm.xml"/>
-      <mapping resource="org/jboss/portlet/forums/impl/PosterImpl.hbm.xml"/>
-      <mapping resource="org/jboss/portlet/forums/impl/PostImpl.hbm.xml"/>
-      <mapping resource="org/jboss/portlet/forums/impl/TopicImpl.hbm.xml"/>
-      <mapping resource="org/jboss/portlet/forums/impl/WatchImpl.hbm.xml"/>
-      <mapping resource="org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml"/>
-   </session-factory>
+      <property name="show_sql">false</property>
+
+      <!-- Force the dialect instead of using autodetection -->
+      <!--
+      <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+      -->
+
+      <!-- Mapping files -->
+      <mapping resource="org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml"/>
+      <mapping resource="org/jboss/portlet/forums/impl/ForumImpl.hbm.xml"/>
+      <mapping resource="org/jboss/portlet/forums/impl/PollImpl.hbm.xml"/>
+      <mapping resource="org/jboss/portlet/forums/impl/PosterImpl.hbm.xml"/>
+      <mapping resource="org/jboss/portlet/forums/impl/PostImpl.hbm.xml"/>
+      <mapping resource="org/jboss/portlet/forums/impl/TopicImpl.hbm.xml"/>
+      <mapping resource="org/jboss/portlet/forums/impl/WatchImpl.hbm.xml"/>
+      <mapping resource="org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml"/>
+   </session-factory>
 </hibernate-configuration>

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/web.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/web.xml	2006-11-18 12:32:45 UTC (rev 7703)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/web.xml	2006-11-18 12:46:39 UTC (rev 7704)
@@ -122,7 +122,11 @@
    			<description>No roles so no direct access</description>
    		</auth-constraint>
     </security-constraint>
-    
+    
+    <listener>
+        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+    </listener>
+
     <!-- integrating BASIC AUTH for the standalone JSF version -->
     <security-constraint>
       <web-resource-collection>




More information about the jboss-svn-commits mailing list