[jboss-svn-commits] JBL Code SVN: r34562 - in labs/jbossforums/trunk: cache-plugin and 21 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Aug 5 19:21:56 EDT 2010


Author: sviluppatorefico
Date: 2010-08-05 19:21:53 -0400 (Thu, 05 Aug 2010)
New Revision: 34562

Added:
   labs/jbossforums/trunk/thirdparty/slf4j/
   labs/jbossforums/trunk/thirdparty/slf4j/README.txt
   labs/jbossforums/trunk/thirdparty/slf4j/lib/
   labs/jbossforums/trunk/thirdparty/slf4j/lib/jcl104-over-slf4j-1.4.2.jar
   labs/jbossforums/trunk/thirdparty/slf4j/lib/slf4j-api-1.4.2.jar
   labs/jbossforums/trunk/thirdparty/slf4j/lib/slf4j-log4j12-1.4.2.jar
Removed:
   labs/jbossforums/trunk/cache-plugin/src/main/org/jboss/portlet/forums/util/cache/AbstractJBossService.java
   labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/jboss-app.xml
Modified:
   labs/jbossforums/trunk/.classpath
   labs/jbossforums/trunk/cache-plugin/build.xml
   labs/jbossforums/trunk/cache-plugin/src/main/org/jboss/portlet/forums/util/cache/JBossTreeCacheProvider.java
   labs/jbossforums/trunk/forums/build.xml
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ForumsModule.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/feeds/FeedsServlet.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/jems/SessionFactoryBinder.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/DownloadFilter.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/PortalUtil.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/event/FloodControlListener.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsAllSubscribed.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsBase.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsMain.java
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java
   labs/jbossforums/trunk/forums/src/resources/portal-forums-ear/META-INF/application.xml
   labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml
   labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml
   labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt
   labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt
   labs/jbossforums/trunk/forums/src/resources/portal-forums-sar/conf/hibernate/setup.txt
   labs/jbossforums/trunk/tools/etc/buildfragments/libraries.ent
Log:
merging with the 1.3.0-ejb branch

Modified: labs/jbossforums/trunk/.classpath
===================================================================
--- labs/jbossforums/trunk/.classpath	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/.classpath	2010-08-05 23:21:53 UTC (rev 34562)
@@ -17,7 +17,7 @@
 	<classpathentry kind="lib" path="thirdparty/oswego-concurrent/lib/concurrent.jar"/>
 	<classpathentry kind="lib" path="thirdparty/sun-servlet/lib/servlet-api.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jakarta-fileupload/lib/commons-fileupload.jar"/>
-	<classpathentry kind="lib" path="thirdparty/jbportal/lib/portal-portlet-lib.jar" sourcepath="/module-portlet"/>
+	<classpathentry kind="lib" path="thirdparty/jbportal/lib/portal-portlet-lib.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jbportal/lib/jboss-portlet-api-lib.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jwebunit-jwebunit/lib/jwebunit.jar"/>
 	<classpathentry kind="lib" path="thirdparty/dbunit-dbunit/lib/dbunit.jar"/>
@@ -34,27 +34,20 @@
 	<classpathentry kind="lib" path="thirdparty/jgroups/lib/jgroups.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss-hibernate-search/lib/lucene-core.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss-hibernate/lib/hibernate-commons-annotations.jar"/>
-	<classpathentry kind="lib" path="thirdparty/portlet/lib/portlet-api.jar" sourcepath="/portlet2-api"/>
+	<classpathentry kind="lib" path="thirdparty/portlet/lib/portlet-api.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jakarta-commons/lib/commons-lang-2.1.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-impl.jar"/>
-	<classpathentry kind="lib" path="thirdparty/jbportal/lib/portal-faces-loader-lib.jar" sourcepath="/JBoss Portal 2.7"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/sun-jsf-1.2-09"/>
+	<classpathentry kind="lib" path="thirdparty/sun-jsf/lib/jsf-api.jar"/>
+	<classpathentry kind="lib" path="thirdparty/sun-jsf/lib/jsf-impl.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jbportal/lib/portal-faces-loader-lib.jar"/>
 	<classpathentry kind="lib" path="thirdparty/facelets/lib/el-api.jar"/>
-	<classpathentry kind="lib" path="thirdparty/jbportal/lib/portletbridge-api.jar" sourcepath="/portletbridge-1.0.0.CR2"/>
+	<classpathentry kind="lib" path="thirdparty/jbportal/lib/portletbridge-api.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jbportal/lib/portletbridge-impl.jar"/>
-	<classpathentry kind="lib" path="thirdparty/jboss-hibernate/lib/ejb3-persistence.jar" sourcepath="/ProvaJPA"/>
-	<classpathentry kind="lib" path="/build/output/jboss-4.2.3.GA/server/default-forums-sun/lib/mysql-connector-java-5.1.7-bin.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-hibernate/lib/ejb3-persistence.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss-j2ee/lib/jboss-ejb3x.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss-hibernate-search/lib/hibernate-search.jar"/>
-	<classpathentry kind="lib" path="/Users/flashboss/Sviluppo/src/workspace_jboss_5.1.0.CR1/thirdparty/hibernate-annotations/lib/hibernate-annotations.jar" sourcepath="/annotations_v3.4.0"/>
-	<classpathentry kind="lib" path="/Users/flashboss/Sviluppo/src/workspace_jboss_5.1.0.CR1/thirdparty/hibernate-entitymanager/lib/hibernate-entitymanager.jar" sourcepath="/entitymanager_v3.4.0"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/annotations_v3.4.0"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/entitymanager_v3.4.0"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/hibernate-3.3.1.GA"/>
 	<classpathentry kind="lib" path="thirdparty/jboss-hibernate/lib/hibernate3.jar"/>
-	<classpathentry kind="lib" path="/Users/flashboss/Sviluppo/src/workspace_jboss_5.1.0.CR1/thirdparty/org/slf4j/lib/slf4j-api.jar"/>
-	<classpathentry kind="lib" path="/Users/flashboss/Sviluppo/src/workspace_jboss_5.1.0.CR1/thirdparty/org/jboss/slf4j/lib/slf4j-jboss-logging.jar"/>
 	<classpathentry kind="lib" path="thirdparty/beanshell/lib/bsh.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-hibernate/lib/hibernate-entitymanager.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-hibernate/lib/hibernate-annotations.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: labs/jbossforums/trunk/cache-plugin/build.xml
===================================================================
--- labs/jbossforums/trunk/cache-plugin/build.xml	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/cache-plugin/build.xml	2010-08-05 23:21:53 UTC (rev 34562)
@@ -68,7 +68,8 @@
       <!-- Configure thirdparty libraries -->
       <call target="configure-libraries"/>
 		<path id="library.classpath">	        
-			<path refid="jboss.cache.classpath"/>				        
+			<path refid="jboss.cache.classpath"/>		        
+			<path refid="jbportal.classpath"/>				        
 			<path refid="jgroups.classpath"/>
 			<path refid="jboss.system.classpath"/>					
 			<path refid="jboss.hibernate.classpath"/>						

Deleted: labs/jbossforums/trunk/cache-plugin/src/main/org/jboss/portlet/forums/util/cache/AbstractJBossService.java
===================================================================
--- labs/jbossforums/trunk/cache-plugin/src/main/org/jboss/portlet/forums/util/cache/AbstractJBossService.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/cache-plugin/src/main/org/jboss/portlet/forums/util/cache/AbstractJBossService.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -1,86 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
- * contributors as indicated by the @authors tag. See the                     *
- * copyright.txt in the distribution for a full listing of                    *
- * individual contributors.                                                   *
- *                                                                            *
- * This is free software; you can redistribute it and/or modify it            *
- * under the terms of the GNU Lesser General Public License as                *
- * published by the Free Software Foundation; either version 2.1 of           *
- * the License, or (at your option) any later version.                        *
- *                                                                            *
- * This software is distributed in the hope that it will be useful,           *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
- * Lesser General Public License for more details.                            *
- *                                                                            *
- * You should have received a copy of the GNU Lesser General Public           *
- * License along with this software; if not, write to the Free                *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
- ******************************************************************************/
-package org.jboss.portlet.forums.util.cache;
-
-import org.jboss.logging.Logger;
-import org.jboss.system.ServiceMBeanSupport;
-
-/**
- * JBoss service integration helper.
- *
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @author <a href="mailto:jedim at vige.it">Luca Stancapiano</a>
- * @version $Revision: 8784 $
- */
-public class AbstractJBossService extends ServiceMBeanSupport
-{
-
-   public AbstractJBossService()
-   {
-   }
-
-   public AbstractJBossService(final Class type)
-   {
-      super(type);
-   }
-
-   public AbstractJBossService(final String category)
-   {
-      super(category);
-   }
-
-   public AbstractJBossService(final Logger log)
-   {
-      super(log);
-   }
-
-   public final int getState()
-   {
-      return super.getState();
-   }
-
-   public final String getStateString()
-   {
-      return super.getStateString();
-   }
-
-   public final void create() throws Exception
-   {
-      super.create();
-   }
-
-   public final void start() throws Exception
-   {
-      super.start();
-   }
-
-   public final void stop()
-   {
-      super.stop();
-   }
-
-   public final void destroy()
-   {
-      super.destroy();
-   }
-}

Modified: labs/jbossforums/trunk/cache-plugin/src/main/org/jboss/portlet/forums/util/cache/JBossTreeCacheProvider.java
===================================================================
--- labs/jbossforums/trunk/cache-plugin/src/main/org/jboss/portlet/forums/util/cache/JBossTreeCacheProvider.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/cache-plugin/src/main/org/jboss/portlet/forums/util/cache/JBossTreeCacheProvider.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -25,6 +25,7 @@
 import javax.management.ObjectName;
 
 import org.jboss.cache.TreeCache;
+import org.jboss.portal.jems.as.system.AbstractJBossService;
 
 /**
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>

Modified: labs/jbossforums/trunk/forums/build.xml
===================================================================
--- labs/jbossforums/trunk/forums/build.xml	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/build.xml	2010-08-05 23:21:53 UTC (rev 34562)
@@ -258,12 +258,13 @@
       <copy todir="${build.resources}/portal-forums-ear">
 			<!--fileset dir="${jakarta.lucene.root}/lib" includes="lucene.jar"/-->
             <fileset dir="${jboss.hibernate.search.root}/lib" includes="lucene-core.jar,hibernate-search.jar"/>
-      	    <fileset dir="${jboss.hibernate.lib}" includes="hibernate-commons-annotations.jar,ejb3-persistence.jar"/>
+      	    <fileset dir="${jboss.hibernate.lib}" includes="hibernate-commons-annotations.jar,ejb3-persistence.jar,ehcache.jar"/>
 			<fileset dir="${build.lib}" includes="portal-forums.war,portal-forums-ui.jar,portal-forums.sar,portal-forums-authz-plugin.sar,portal-forums-uif.jar"/>
 			<fileset dir="${facelets.lib}" includes="jsf-facelets.jar,jsf-example.jar"/>
 			<fileset dir="${jakarta.commons.lib}" includes="commons-beanutils.jar,commons-codec.jar,commons-collections.jar,commons-digester-1.7-brew.jar"/>
 			<fileset dir="${sun.portlet.lib}" includes="jsf-portlet.jar" />
-      	    <fileset dir="${jbportal.lib}" includes="portletbridge-api.jar,portletbridge-impl.jar" />
+      	    <fileset dir="${portlet.lib}" includes="portlet-api.jar" />
+      	    <fileset dir="${jbportal.lib}" includes="portletbridge-api.jar,portletbridge-impl.jar,portal-jems-lib.jar,portal-common-lib.jar,portal-identity-lib.jar" />
 	  </copy>
 	  <jar jarfile="${build.lib}/jboss-forums.ear">
 			<fileset dir="${build.resources}/portal-forums-ear" includes="**/*"/>
@@ -296,7 +297,8 @@
 			<fileset dir="${facelets.lib}" includes="jsf-facelets.jar,jsf-example.jar"/>
 			<fileset dir="${jakarta.commons.lib}" includes="commons-beanutils.jar,commons-codec.jar,commons-collections.jar,commons-digester-1.7-brew.jar"/>
 			<fileset dir="${sun.portlet.lib}" includes="jsf-portlet.jar" />
-  	    <fileset dir="${jbportal.lib}" includes="portletbridge-api.jar,portletbridge-impl.jar" />
+  	        <fileset dir="${portlet.lib}" includes="portlet-api.jar" />
+  	        <fileset dir="${jbportal.lib}" includes="portletbridge-api.jar,portletbridge-impl.jar,portal-jems-lib.jar,portal-common-lib.jar,portal-identity-lib.jar" />
 	  </copy>
 	  <jar jarfile="${build.lib}/jboss-forums-ha.ear">
 			<fileset dir="${build.resources}/portal-forums-ha-ear" includes="**/*"/>
@@ -309,7 +311,8 @@
 			<fileset dir="${facelets.lib}" includes="jsf-facelets.jar,jsf-example.jar"/>
 			<fileset dir="${jakarta.commons.lib}" includes="commons-beanutils.jar,commons-codec.jar,commons-collections.jar,commons-digester-1.7-brew.jar"/>
 			<fileset dir="${sun.portlet.lib}" includes="jsf-portlet.jar" />
-  	    <fileset dir="${jbportal.lib}" includes="portletbridge-api.jar,portletbridge-impl.jar" />
+  	        <fileset dir="${portlet.lib}" includes="portlet-api.jar" />
+  	        <fileset dir="${jbportal.lib}" includes="portletbridge-api.jar,portletbridge-impl.jar,portal-jems-lib.jar,portal-common-lib.jar,portal-identity-lib.jar" />
 	  </copy>
 	  <jar jarfile="${build.lib}/jboss-forums-ha-jbp.ear">
 			<fileset dir="${build.resources}/portal-forums-ha-jbp-ear" includes="**/*"/>

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ForumsModule.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ForumsModule.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ForumsModule.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -550,7 +550,7 @@
     * @return DOCUMENT_ME
     * @throws ModuleException DOCUMENT_ME
     */
-   List findPostsByTopicId(Integer topicID)
+   List findPostsByTopicId(Topic topic)
       throws ModuleException;
 
     /**
@@ -586,7 +586,7 @@
      * @return DOCUMENT_ME
      * @throws ModuleException DOCUMENT_ME
      */
-    List findPostIdsAsc(Integer topicID,
+    List findPostIdsAsc(Topic topic,
                                int start,
                                int limit)
        throws ModuleException;
@@ -600,7 +600,7 @@
      * @return DOCUMENT_ME
      * @throws ModuleException DOCUMENT_ME
      */
-    List findPostIdsDesc(Integer topicID,
+    List findPostIdsDesc(Topic topic,
                                 int start,
                                 int limit)
        throws ModuleException;   
@@ -615,7 +615,7 @@
     * @return DOCUMENT_ME
     * @throws ModuleException DOCUMENT_ME
     */
-   List findPostsByTopicIdAsc(Integer topicID,
+   List findPostsByTopicIdAsc(Topic topic,
                               int start,
                               int limit)
       throws ModuleException;
@@ -629,7 +629,7 @@
     * @return DOCUMENT_ME
     * @throws ModuleException DOCUMENT_ME
     */
-   List findPostsByTopicIdDesc(Integer topicID,
+   List findPostsByTopicIdDesc(Topic topic,
                                int start,
                                int limit)
       throws ModuleException;

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/feeds/FeedsServlet.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/feeds/FeedsServlet.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/feeds/FeedsServlet.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -69,7 +69,7 @@
      */
 	private static final long serialVersionUID = 1L;
 
-	@EJB(name = "ForumsModuleImpl/local")
+	@EJB(name = "jboss-forums/ForumsModuleImpl/local")
 	private ForumsModule forumsModule;
 
 	private static final Logger log = Logger.getLogger(FeedsServlet.class);

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	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -404,8 +404,8 @@
 			Query query = session.createNamedQuery("findTopicsType" + order);
 			query.setFirstResult(start);
 			query.setMaxResults(perPage);
-			query.setParameter("forumid", "" + forum.getId());
-			query.setParameter("type", "" + type);
+			query.setParameter("forumid", forum);
+			query.setParameter("type", type);
 			List list = query.getResultList();
 			return list;
 		} catch (Exception e) {
@@ -430,7 +430,7 @@
 			Query query = session.createNamedQuery("findTopicsForum" + order);
 			query.setFirstResult(start);
 			query.setMaxResults(perPage);
-			query.setParameter("forumid", "" + forum.getId());
+			query.setParameter("forumid", forum);
 			List list = query.getResultList();
 			return list;
 		} catch (Exception e) {
@@ -990,13 +990,13 @@
 		}
 	}
 
-	private List findPostsByTopicId(Integer topicId, int start, int limit,
+	private List findPostsByTopicId(Topic topic, int start, int limit,
 			String order) throws ModuleException {
 		try {
 			EntityManager session = getSession();
 			Query query = session
 					.createNamedQuery("findPostsByTopicId" + order);
-			query.setParameter("topicId", topicId.toString());
+			query.setParameter("topicId", topic);
 			query.setFirstResult(start);
 			if (limit != 0) {
 				query.setMaxResults(limit);
@@ -1048,12 +1048,12 @@
 		return findPostsByIdsFetchAttachmentsAndPosters(postIds, "desc");
 	}
 
-	private List findPostIds(Integer topicId, int start, int limit, String order)
+	private List findPostIds(Topic topic, int start, int limit, String order)
 			throws ModuleException {
 		try {
 			EntityManager session = getSession();
 			Query query = session.createNamedQuery("findPostIds" + order);
-			query.setParameter("topicId", topicId.toString());
+			query.setParameter("topicId", topic);
 			query.setFirstResult(start);
 			if (limit != 0) {
 				query.setMaxResults(limit);
@@ -1066,21 +1066,21 @@
 		}
 	}
 
-	public List findPostIdsAsc(Integer topicId, int start, int limit)
+	public List findPostIdsAsc(Topic topic, int start, int limit)
 			throws ModuleException {
-		return findPostIds(topicId, start, limit, "asc");
+		return findPostIds(topic, start, limit, "asc");
 	}
 
-	public List findPostIdsDesc(Integer topicId, int start, int limit)
+	public List findPostIdsDesc(Topic topic, int start, int limit)
 			throws ModuleException {
-		return findPostIds(topicId, start, limit, "desc");
+		return findPostIds(topic, start, limit, "desc");
 	}
 
-	public List findPostsByTopicId(Integer topicId) throws ModuleException {
+	public List findPostsByTopicId(Topic topic) throws ModuleException {
 		try {
 			EntityManager session = getSession();
 			Query query = session.createNamedQuery("findPostsByTopicIdNoOrder");
-			query.setParameter("topicId", topicId.toString());
+			query.setParameter("topicId", topic);
 			return query.getResultList();
 		} catch (Exception e) {
 			String message = "Cannot find posts";
@@ -1102,14 +1102,14 @@
 		source.setForums(new ArrayList());
 	}
 
-	public List findPostsByTopicIdAsc(Integer topicId, int start, int limit)
+	public List findPostsByTopicIdAsc(Topic topic, int start, int limit)
 			throws ModuleException {
-		return findPostsByTopicId(topicId, start, limit, "asc");
+		return findPostsByTopicId(topic, start, limit, "asc");
 	}
 
-	public List findPostsByTopicIdDesc(Integer topicId, int start, int limit)
+	public List findPostsByTopicIdDesc(Topic topic, int start, int limit)
 			throws ModuleException {
-		return findPostsByTopicId(topicId, start, limit, "desc");
+		return findPostsByTopicId(topic, start, limit, "desc");
 	}
 
 	public Date findLastPostDateForUser(User user) throws ModuleException {

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/jems/SessionFactoryBinder.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/jems/SessionFactoryBinder.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/jems/SessionFactoryBinder.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -297,12 +297,14 @@
 		}
 	}
 
-	public void createContent() {
+	public void createContent() throws NamingException {
 		if (setupResource != null) {
 			if (setupResource.exists()) {
 				EntityManager session = null;
+				UserTransaction ut = (UserTransaction) new InitialContext()
+				.lookup("/UserTransaction");
 				try {
-					log.info("Creating database content");
+					log.info("Creating database content");	
 					session = sessionFactory.createEntityManager();
 					String script = setupResource.asString("UTF-8");
 
@@ -312,11 +314,20 @@
 							.getContextClassLoader());
 					interpreter.setOut(System.out);
 					interpreter.set("Session", session);
+					ut.begin();
 					interpreter.eval(script);
+					ut.commit();
 				} catch (EvalError e) {
 					log.error("Error in the bsh script", e);
 				} catch (IllegalStateException e) {
 					log.error("Cannot load setup script", e);
+				} catch (Exception e) {
+					log.error("Cannot load setup script", e);
+					try {
+					    ut.rollback();
+					} catch (SystemException se) {
+						se.printStackTrace();
+					}
 				} finally {
 					IOTools.safeClose(session);
 				}

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -25,12 +25,17 @@
 import java.io.Serializable;
 import java.util.Map;
 
+import javax.naming.InitialContext;
+
+import org.jboss.portlet.forums.ForumsModule;
+
 /**
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  *
  */
 public abstract class BaseController implements Serializable,Constants
 {
+    private static ForumsModule singleton = null;  
     
     private String mainPageName = ""; //bean=level configuration supplied by the forums-config.xml
     private Map links = null;
@@ -89,5 +94,15 @@
     public boolean isAnonymous()
     {
         return JSFUtil.isAnonymous();
-    } 
+    }     
+    
+    //------utility method to grab the forums module------------------------------------------------------------------------------------------
+    public static ForumsModule getForumsModule() throws Exception
+    {
+        if(BaseController.singleton==null)
+        {
+            BaseController.singleton = (ForumsModule)new InitialContext().lookup("jboss-forums/ForumsModuleImpl/local");
+        }
+        return BaseController.singleton;
+    }
 }

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/DownloadFilter.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/DownloadFilter.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/DownloadFilter.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -47,7 +47,7 @@
 public class DownloadFilter implements Filter 
 {
 	
-	@EJB(name="ForumsModuleImpl/local")
+	@EJB(name="jboss-forums/ForumsModuleImpl/local")
     private ForumsModule forumsModule;  
 	
     /**

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/PortalUtil.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/PortalUtil.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/PortalUtil.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -34,7 +34,6 @@
 import java.util.SortedMap;
 import java.util.TreeMap;
 
-import javax.ejb.EJB;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
@@ -54,7 +53,6 @@
 import org.jboss.portal.identity.UserModule;
 import org.jboss.portal.identity.UserProfileModule;
 import org.jboss.portlet.forums.ForumsConstants;
-import org.jboss.portlet.forums.ForumsModule;
 import org.jboss.portlet.forums.feeds.FeedConstants;
 import org.jboss.portlet.forums.format.render.bbcodehtml.ToHTMLConfig;
 import org.jboss.portlet.forums.format.render.bbcodehtml.ToHTMLRenderer;
@@ -95,9 +93,6 @@
     private static Logger log = Logger.getLogger(PortalUtil.class);
     
     private static SimpleDateFormat sdfForLastLoginDate;
-
-    @EJB(name="jboss-forums/ForumsModuleImpl/local")
-    private static ForumsModule forumsModule;    
 	
 	static {
 
@@ -574,7 +569,7 @@
 
                 try
                 {
-                	forumsModule.processNotifications(
+                	BaseController.getForumsModule().processNotifications(
                             postId, type, postUrl, replyUrl);
                 } catch (Exception e)
                 {
@@ -776,7 +771,7 @@
             User user = PortalUtil.getUser();
 
             Object userId = user.getId();
-            poster = forumsModule.findPosterByUserId(
+            poster = BaseController.getForumsModule().findPosterByUserId(
                     userId.toString());
 
             if (poster == null)
@@ -797,7 +792,7 @@
         UserModule userModule = null;
         User user = null;
         
-        String guestUserName = forumsModule.getGuestUserName();
+        String guestUserName = BaseController.getForumsModule().getGuestUserName();
         
         try
         {                                
@@ -810,7 +805,7 @@
         }
         
         Long userId = (Long) user.getId();
-        poster = forumsModule.findPosterByUserId(
+        poster = BaseController.getForumsModule().findPosterByUserId(
                 String.valueOf(userId));
         
         if (poster == null) {
@@ -990,7 +985,7 @@
                 return null;
             }
             
-            Watch watch = forumsModule.findForumWatchByUserAndForum( user , forum.getId().intValue() );
+            Watch watch = BaseController.getForumsModule().findForumWatchByUserAndForum( user , forum.getId().intValue() );
             
             if (watch!=null)
             {

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -25,10 +25,8 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 
+import javax.annotation.PostConstruct;
 import javax.ejb.EJB;
-import javax.ejb.Stateless;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
 
 import org.jboss.portal.core.modules.ModuleException;
 import org.jboss.portlet.forums.ForumsModule;
@@ -49,14 +47,10 @@
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
  */
- at Stateless
 public class AdminController extends ActionController 
 {
 	
-	@PersistenceContext(unitName = "default")
-	private EntityManager em;
-	
-	@EJB(name="ForumsModuleImpl/local")
+	@EJB(name="jboss-forums/ForumsModuleImpl/local")
     private ForumsModule forumsModule;  
 	
     private static final int up = -15;
@@ -217,7 +211,8 @@
      * 
      *
      */
-    public AdminController()
+	@PostConstruct
+	public void startService()
     { 
         try
         {
@@ -425,7 +420,6 @@
             JSFUtil.setMessage(Constants.FEEDBACK,start+" \""+this.categoryName+"\" "+end);
            
             navState = Constants.DELETE_CATEGORY;
-            em.flush();
             success = true;
        }
        catch(Exception e)
@@ -500,8 +494,7 @@
             Category selectedCategory = forumsModule.findCategoryById(this.selectedCategory);
             forum.setCategory((CategoryImpl)selectedCategory);
             forum.setName(this.forumName);
-            forum.setDescription(this.forumDescription);	        	        
-            em.flush();
+            forum.setDescription(this.forumDescription);
                 
             String start = JSFUtil.getBundleMessage("ResourceJSF","Forum_updated_0");
             String end = JSFUtil.getBundleMessage("ResourceJSF","Forum_updated_1");

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -31,11 +31,8 @@
 import java.util.Map;
 
 import javax.ejb.EJB;
-import javax.ejb.Stateless;
 import javax.faces.application.FacesMessage;
 import javax.faces.context.FacesContext;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
 
 import org.jboss.portal.core.modules.ModuleException;
 import org.jboss.portlet.forums.ForumsModule;
@@ -56,14 +53,10 @@
  * 
  * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
  */
- at Stateless
 public class ModeratorAction extends BaseController
 {
 	
-	@PersistenceContext(unitName = "default")
-	private EntityManager em;
-	
-	@EJB(name="ForumsModuleImpl/local")
+	@EJB(name="jboss-forums/ForumsModuleImpl/local")
     private ForumsModule forumsModule;    
 	
     //preference related data
@@ -233,8 +226,6 @@
                     
                     this.forum.setPostCount(this.forum.getPostCount()-topic.getReplies()-1);
                     this.forum.setTopicCount(this.forum.getTopicCount()-1);
-                    
-                    em.flush();
                 }
             }
             setInfoBundleMessage("SUCC_TOPIC_MOVED");

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -27,11 +27,8 @@
 import java.util.Map;
 
 import javax.ejb.EJB;
-import javax.ejb.Stateless;
 import javax.faces.application.FacesMessage;
 import javax.faces.context.FacesContext;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
 
 import org.jboss.portlet.forums.ForumsModule;
 import org.jboss.portlet.forums.impl.ForumImpl;
@@ -52,13 +49,9 @@
  *
  * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
  */
- at Stateless
 public class SplitTopic extends BaseController {
-
-	@PersistenceContext(unitName = "default")
-	private EntityManager em;
 	
-	@EJB(name="ForumsModuleImpl/local")
+	@EJB(name="jboss-forums/ForumsModuleImpl/local")
     private ForumsModule forumsModule;    
 	
     // Title for newly created topic
@@ -158,8 +151,6 @@
         
         try {
             
-            em.refresh(this.topic);
-            
             Forum destForum = forumsModule.findForumById(new Integer(toForumId));
             
             // Creating new topic in destination forum.
@@ -204,7 +195,6 @@
             destForum.addTopicSize();
             destForum.setPostCount(destForum.getPostCount()+newTopic.getReplies()+1);
 
-            em.flush();
         } catch (Exception e) {
             e.printStackTrace();
             setWarnBundleMessage("ERR_INTERNAL");
@@ -287,8 +277,6 @@
                 newTopic.addPost((PostImpl)movedPost);
             }
             
-            em.refresh(this.topic);
-            
             ForumImpl fromForum = topic.getForum();
             topic.setReplies(topic.getReplies()-checkboxes.size());
             fromForum.setPostCount(fromForum.getPostCount()-checkboxes.size());
@@ -299,8 +287,6 @@
             
             destForum.addTopicSize();
             destForum.setPostCount(destForum.getPostCount()+newTopic.getReplies()+1);
-            
-            em.flush();
         } catch (Exception e) {
             e.printStackTrace();
             setWarnBundleMessage("ERR_INTERNAL");

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -22,6 +22,7 @@
  ******************************************************************************/
 package org.jboss.portlet.forums.ui.action;
 
+import javax.annotation.PostConstruct;
 import javax.ejb.EJB;
 
 import org.jboss.portlet.forums.ForumsModule;
@@ -127,8 +128,8 @@
      * 
      *
      */
-    public TopicWatchController()
-    {
+	@PostConstruct
+	public void startService() {
         try
         {
             String t = JSFUtil.getRequestParameter(Constants.p_topicId);

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/event/FloodControlListener.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/event/FloodControlListener.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/event/FloodControlListener.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -24,19 +24,15 @@
 
 import java.util.Date;
 
-import javax.ejb.EJB;
 import javax.faces.event.AbortProcessingException;
 import javax.faces.event.ActionEvent;
 import javax.faces.event.ActionListener;
 
 import org.jboss.portal.identity.User;
-import org.jboss.portlet.forums.ForumsModule;
+import org.jboss.portlet.forums.ui.BaseController;
 import org.jboss.portlet.forums.ui.PortalUtil;
 
 public class FloodControlListener implements ActionListener {
-	
-	@EJB(name="jboss-forums/ForumsModuleImpl/local")
-    private ForumsModule forumsModule;  
 
     private long floodInterval;
 
@@ -45,7 +41,7 @@
         
         try 
         {
-            floodInterval = forumsModule.getFloodInterval();
+            floodInterval = BaseController.getForumsModule().getFloodInterval();
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -60,7 +56,7 @@
             User user = PortalUtil.getUser();
             
             if (user != null) {
-                Date lastPost = forumsModule.findLastPostDateForUser(user);
+                Date lastPost = BaseController.getForumsModule().findLastPostDateForUser(user);
             
                 if (lastPost != null)
                 {

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsAllSubscribed.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsAllSubscribed.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsAllSubscribed.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -163,6 +163,11 @@
         this.watchedTopics = watchedTopics;
     }
     
+    protected ForumsModule getMyForumsModule()
+    {
+        return forumsModule;
+    }
+    
     // -------- Business logic ----------------------------------------------------------------------------------------------------------------
     
 }

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsBase.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsBase.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsBase.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -45,9 +45,6 @@
  */
 public abstract class ViewMyForumsBase extends BaseController
 {
-	
-	@EJB(name="jboss-forums/ForumsModuleImpl/local")
-    private ForumsModule forumsModule;  
     
     //preference related data
     private PreferenceController userPreferences = null;
@@ -78,7 +75,7 @@
                         TopicImpl topic = (TopicImpl)it.next();
                         temporaryContainer.add(topic);
                     }
-                    topicsLastPosts = forumsModule.findLastPostsOfTopics(temporaryContainer);
+                    topicsLastPosts = getMyForumsModule().findLastPostsOfTopics(temporaryContainer);
                 }
             } catch (Exception e)
             {
@@ -181,5 +178,7 @@
         }
         
     }
+    
+    protected abstract ForumsModule getMyForumsModule();
 
 }

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsMain.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsMain.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewMyForumsMain.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -29,10 +29,12 @@
 import java.util.Map;
 
 import javax.ejb.EJB;
+import javax.naming.InitialContext;
 
 import org.jboss.portlet.forums.ForumsModule;
 import org.jboss.portlet.forums.impl.ForumImpl;
 import org.jboss.portlet.forums.impl.PostImpl;
+import org.jboss.portlet.forums.ui.BaseController;
 import org.jboss.portlet.forums.ui.Constants;
 import org.jboss.portlet.forums.ui.ForumUtil;
 import org.jboss.portlet.forums.ui.JSFUtil;
@@ -255,4 +257,9 @@
         }
     }
     
+    protected ForumsModule getMyForumsModule()
+    {
+        return forumsModule;
+    }
+    
 }

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java	2010-08-05 23:21:53 UTC (rev 34562)
@@ -231,9 +231,9 @@
             this.topic = post.getTopic();
             List postIds = null;
             if (postOrder.compareToIgnoreCase("ascending")==0) {
-                postIds = forumsModule.findPostIdsAsc(this.topic.getId(),0,Integer.MAX_VALUE);
+                postIds = forumsModule.findPostIdsAsc(this.topic,0,Integer.MAX_VALUE);
             } else {
-                postIds = forumsModule.findPostIdsDesc(this.topic.getId(),0,Integer.MAX_VALUE);
+                postIds = forumsModule.findPostIdsDesc(this.topic,0,Integer.MAX_VALUE);
             }
             int counter = 0;
             Iterator it = postIds.iterator();
@@ -284,7 +284,7 @@
                                     }
                                 
                                     try {
-                                        return fm.findPostIdsAsc(topic.getId(),
+                                        return fm.findPostIdsAsc(topic,
                                                                  beginIndex,
                                                                  pageSize);
                                     } catch (ModuleException e) {
@@ -318,7 +318,7 @@
                                     }
                                     
                                     try {
-                                        return fm.findPostIdsDesc(topic.getId(),
+                                        return fm.findPostIdsDesc(topic,
                                                                   beginIndex,
                                                                   pageSize);
                                     } catch (ModuleException e) {

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-ear/META-INF/application.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-ear/META-INF/application.xml	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-ear/META-INF/application.xml	2010-08-05 23:21:53 UTC (rev 34562)
@@ -43,6 +43,21 @@
 	   <java>portletbridge-impl.jar</java>
    </module>
    <module>
+	   <java>portal-jems-lib.jar</java>
+   </module>
+   <module>
+	   <java>portal-common-lib.jar</java>
+   </module>
+   <module>
+	   <java>portal-identity-lib.jar</java>
+   </module>
+   <module>
+	   <java>ehcache.jar</java>
+   </module>
+   <module>
+	   <java>portlet-api.jar</java>
+   </module>
+   <module>
       <web>
          <web-uri>portal-forums.war</web-uri>
          <!--context-root>/forums</context-root-->

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml	2010-08-05 23:21:53 UTC (rev 34562)
@@ -29,6 +29,18 @@
 	   <java>portletbridge-impl.jar</java>
    </module>
    <module>
+	   <java>portal-jems-lib.jar</java>
+   </module>
+   <module>
+	   <java>portal-common-lib.jar</java>
+   </module>
+   <module>
+	   <java>portal-identity-lib.jar</java>
+   </module>
+   <module>
+	   <java>portlet-api.jar</java>
+   </module>
+   <module>
       <web>
          <web-uri>portal-forums.war</web-uri>
          <!--context-root>/forums</context-root-->

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml	2010-08-05 23:21:53 UTC (rev 34562)
@@ -29,6 +29,18 @@
 	   <java>portletbridge-impl.jar</java>
    </module>
    <module>
+	   <java>portal-jems-lib.jar</java>
+   </module>
+   <module>
+	   <java>portal-common-lib.jar</java>
+   </module>
+   <module>
+	   <java>portal-identity-lib.jar</java>
+   </module>
+   <module>
+	   <java>portlet-api.jar</java>
+   </module>
+   <module>
       <web>
          <web-uri>portal-forums.war</web-uri>
          <!--context-root>/forums</context-root-->

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt	2010-08-05 23:21:53 UTC (rev 34562)
@@ -6,15 +6,11 @@
 // Luca Stancapiano -- import
 import org.jboss.portlet.forums.impl.ForumInstanceImpl;
 
-   tx = Session.getTransaction();
-   tx.begin();
-
    /* Luca Stancapiano start - I add a new ForumInstanceImpl that contains all 
       instances of categories.
       It is the principal reference for a forum and it has the 
       history of all forum instances in a portal */
    ForumInstanceImpl fii = new ForumInstanceImpl();
-   fii.setId(new Integer(1));
    fii.setName("First forum");
    fii.setCategories(new java.util.ArrayList());
    // Luca Stancapiano end
@@ -74,5 +70,4 @@
    Session.flush();
    //Session.persist(forum1);
    //Session.persist(forum2);
-   tx.commit();
 

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt	2010-08-05 23:21:53 UTC (rev 34562)
@@ -6,15 +6,11 @@
 // Luca Stancapiano -- import
 import org.jboss.portlet.forums.impl.ForumInstanceImpl;
 
-   tx = Session.getTransaction();
-   tx.begin();
-
    /* Luca Stancapiano start - I add a new ForumInstanceImpl that contains all 
       instances of categories.
       It is the principal reference for a forum and it has the 
       history of all forum instances in a portal */
    ForumInstanceImpl fii = new ForumInstanceImpl();
-   fii.setId(new Integer(1));
    fii.setName("First forum");
    fii.setCategories(new java.util.ArrayList());
    // Luca Stancapiano end
@@ -74,4 +70,3 @@
    //Session.flush();
    //Session.persist(forum1);
    //Session.persist(forum2);
-   tx.commit();

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-sar/conf/hibernate/setup.txt
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-sar/conf/hibernate/setup.txt	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-sar/conf/hibernate/setup.txt	2010-08-05 23:21:53 UTC (rev 34562)
@@ -6,15 +6,11 @@
 // Luca Stancapiano -- import
 import org.jboss.portlet.forums.impl.ForumInstanceImpl;
 
-   tx = Session.getTransaction();
-   tx.begin();
-
    /* Luca Stancapiano start - I add a new ForumInstanceImpl that contains all 
       instances of categories.
       It is the principal reference for a forum and it has the 
       history of all forum instances in a portal */
    ForumInstanceImpl fii = new ForumInstanceImpl();
-   fii.setId(new Integer(1));
    fii.setName("First forum");
    fii.setCategories(new java.util.ArrayList());
    // Luca Stancapiano end
@@ -66,12 +62,9 @@
    // Luca Stancapiano start - I save ForumInstance record and all his children records
    fii.addCategory(cat);
    Session.persist(fii);
-   Session.flush();   // Luca Stancapiano - it is required for clustering versions
    // Luca Stancapiano end
 
    //
    Session.persist(cat);
-   Session.flush();   // Luca Stancapiano - it is required for clustering versions
-   //Session.persist(forum1);
-   //Session.persist(forum2);
-   tx.commit();
+   Session.persist(forum1);
+   Session.persist(forum2);

Deleted: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/jboss-app.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/jboss-app.xml	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/jboss-app.xml	2010-08-05 23:21:53 UTC (rev 34562)
@@ -1,3 +0,0 @@
-<jboss-app>
-   <app-name>forums</app-name>
-</jboss-app>

Added: labs/jbossforums/trunk/thirdparty/slf4j/README.txt
===================================================================
--- labs/jbossforums/trunk/thirdparty/slf4j/README.txt	                        (rev 0)
+++ labs/jbossforums/trunk/thirdparty/slf4j/README.txt	2010-08-05 23:21:53 UTC (rev 34562)
@@ -0,0 +1,10 @@
+<groupId>org.slf4j</groupId>
+<artifactId>slf4j-parent</artifactId>
+<version>1.4.2</version>
+
+<packaging>pom</packaging>
+<name>SLF4J</name>
+
+<url>http://www.slf4j.org</url>
+
+


Property changes on: labs/jbossforums/trunk/thirdparty/slf4j/README.txt
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: labs/jbossforums/trunk/thirdparty/slf4j/lib/jcl104-over-slf4j-1.4.2.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossforums/trunk/thirdparty/slf4j/lib/jcl104-over-slf4j-1.4.2.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossforums/trunk/thirdparty/slf4j/lib/slf4j-api-1.4.2.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossforums/trunk/thirdparty/slf4j/lib/slf4j-api-1.4.2.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossforums/trunk/thirdparty/slf4j/lib/slf4j-log4j12-1.4.2.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossforums/trunk/thirdparty/slf4j/lib/slf4j-log4j12-1.4.2.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: labs/jbossforums/trunk/tools/etc/buildfragments/libraries.ent
===================================================================
--- labs/jbossforums/trunk/tools/etc/buildfragments/libraries.ent	2010-08-05 21:43:13 UTC (rev 34561)
+++ labs/jbossforums/trunk/tools/etc/buildfragments/libraries.ent	2010-08-05 23:21:53 UTC (rev 34562)
@@ -187,7 +187,8 @@
 		portal-api-lib.jar,
 		portal-faces-lib.jar,
 		portal-faces-loader-lib.jar,
-		portletbridge-api.jar
+		portletbridge-api.jar,
+		portal-identity-lib.jar
 		"
    />
   </path>



More information about the jboss-svn-commits mailing list