[jboss-svn-commits] JBL Code SVN: r18392 - in labs/jbossforums/branches/multipleforums110P26/forums/src/resources: portal-forums-ha-ear and 21 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Feb 7 13:52:19 EST 2008


Author: sviluppatorefico
Date: 2008-02-07 13:52:19 -0500 (Thu, 07 Feb 2008)
New Revision: 18392

Added:
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
   labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
Log:
clusterized forums

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+   <display-name>JBoss Forums</display-name>
+   <module>
+           <java>portal-forums-ui.jar</java>
+   </module>
+   <module>
+	   <java>jsf-facelets.jar</java>
+   </module>
+   <module>
+	   <java>el-api.jar</java>
+   </module>
+   <module>
+	   <java>el-ri.jar</java>
+   </module>
+   <module>
+	   <java>tomahawk.jar</java>
+   </module>
+   <module>
+	   <java>myfaces-impl.jar</java>
+   </module>
+   <module>
+	   <java>myfaces-api.jar</java>
+   </module>
+   <module>
+	   <java>commons-collections.jar</java>
+   </module>
+   <module>
+	   <java>commons-beanutils.jar</java>
+   </module>
+   <module>
+	   <java>commons-el.jar</java>
+   </module>
+   <module>
+	   <java>commons-digester-1.6.jar</java>
+   </module>
+   <module>
+	   <java>commons-codec.jar</java>
+   </module>
+   <module>
+	   <java>portal-faces-lib.jar</java>
+   </module>
+   <module>
+	   <java>jsf-example.jar</java>
+   </module>
+   <module>
+      <web>
+         <web-uri>portal-forums.war</web-uri>
+         <!--context-root>/forums</context-root-->
+      </web>
+   </module>   
+</application>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-app>
+   <loader-repository> 
+         forums.jboss.com:loader=jboss-forums-ha-sar 
+      <loader-repository-config>
+         java2ParentDelegation=false
+      </loader-repository-config> 
+   </loader-repository>
+   <module>
+	   <java>portal-forums-ui.jar</java>
+   </module>
+   <module>
+      <service>portal-forums-ha.sar</service>
+   </module>
+   <module>
+	   <service>portal-forums-authz-plugin.sar</service>
+   </module>
+   <module>
+	   <service>portal-forums-cache-plugin.sar</service>
+   </module>
+   <module>
+      <service>jboss-service.xml</service>
+   </module>
+</jboss-app>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,34 @@
+<?xml version='1.0'?>
+<!DOCTYPE policy PUBLIC
+      "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+      "http://www.jboss.org/j2ee/dtd/security_config.dtd">
+
+<!-- The JAAS login configuration file for the java:/jaas/jbossweb-form-auth
+security domain used by the security-spec test case
+-->
+<!--<policy>
+    <application-policy name="forums">       
+       <authentication>
+	       <login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required">
+            <module-option name="unauthenticatedIdentity">guest</module-option>
+            <module-option name="hashAlgorithm">MD5</module-option>
+            <module-option name="hashEncoding">HEX</module-option>
+            <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
+            <module-option name="additionalRole">Authenticated</module-option>
+            <module-option name="password-stacking">useFirstPass</module-option>
+         </login-module>
+      </authentication>
+    </application-policy>
+</policy>-->
+<policy>
+	<application-policy name="forums">       
+       <authentication>
+<login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required">             <module-option name="unauthenticatedIdentity">guest</module-option>
+	<module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
+	<module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
+	<module-option name="additionalRole">Authenticated</module-option>
+	<module-option name="password-stacking">useFirstPass</module-option>
+</login-module>
+</authentication>
+</application-policy>
+</policy>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>   
+   <!-- hooking in a login module for the standalone version of JSF Forums -->
+    <!-- The custom JAAS login configuration that installs 
+       a Configuration capable of dynamically updating the
+       config settings
+   -->
+   <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
+      name="jboss.security.tests:service=LoginConfig">
+      <attribute name="AuthConfig">META-INF/security-config.xml</attribute>
+      <depends optional-attribute-name="LoginConfigService">
+         jboss.security:service=XMLLoginConfig
+      </depends>
+      <depends optional-attribute-name="SecurityManagerService">
+         jboss.security:service=JaasSecurityManager
+      </depends>
+   </mbean>
+</server>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+   <display-name>JBoss Forums</display-name>
+   <module>
+           <java>portal-forums-ui.jar</java>
+   </module>
+   <module>
+	   <java>jsf-facelets.jar</java>
+   </module>
+   <module>
+	   <java>el-api.jar</java>
+   </module>
+   <module>
+	   <java>el-ri.jar</java>
+   </module>
+   <module>
+	   <java>tomahawk.jar</java>
+   </module>
+   <module>
+	   <java>myfaces-impl.jar</java>
+   </module>
+   <module>
+	   <java>myfaces-api.jar</java>
+   </module>
+   <module>
+	   <java>commons-collections.jar</java>
+   </module>
+   <module>
+	   <java>commons-beanutils.jar</java>
+   </module>
+   <module>
+	   <java>commons-el.jar</java>
+   </module>
+   <module>
+	   <java>commons-digester-1.6.jar</java>
+   </module>
+   <module>
+	   <java>commons-codec.jar</java>
+   </module>
+   <module>
+	   <java>portal-faces-lib.jar</java>
+   </module>
+   <module>
+	   <java>jsf-example.jar</java>
+   </module>
+   <module>
+      <web>
+         <web-uri>portal-forums.war</web-uri>
+         <!--context-root>/forums</context-root-->
+      </web>
+   </module>   
+</application>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-app>
+   <loader-repository> 
+         forums.jboss.com:loader=jboss-forums-ha-sar 
+      <loader-repository-config>
+         java2ParentDelegation=false
+      </loader-repository-config> 
+   </loader-repository>
+   <module>
+	   <java>portal-forums-ui.jar</java>
+   </module>
+   <module>
+      <service>portal-forums-ha-jbp.sar</service>
+   </module>
+   <module>
+	   <service>portal-forums-authz-plugin.sar</service>
+   </module>
+   <module>
+      <service>jboss-service.xml</service>
+   </module>
+</jboss-app>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,34 @@
+<?xml version='1.0'?>
+<!DOCTYPE policy PUBLIC
+      "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+      "http://www.jboss.org/j2ee/dtd/security_config.dtd">
+
+<!-- The JAAS login configuration file for the java:/jaas/jbossweb-form-auth
+security domain used by the security-spec test case
+-->
+<!--<policy>
+    <application-policy name="forums">       
+       <authentication>
+	       <login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required">
+            <module-option name="unauthenticatedIdentity">guest</module-option>
+            <module-option name="hashAlgorithm">MD5</module-option>
+            <module-option name="hashEncoding">HEX</module-option>
+            <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
+            <module-option name="additionalRole">Authenticated</module-option>
+            <module-option name="password-stacking">useFirstPass</module-option>
+         </login-module>
+      </authentication>
+    </application-policy>
+</policy>-->
+<policy>
+	<application-policy name="forums">       
+       <authentication>
+<login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required">             <module-option name="unauthenticatedIdentity">guest</module-option>
+	<module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
+	<module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
+	<module-option name="additionalRole">Authenticated</module-option>
+	<module-option name="password-stacking">useFirstPass</module-option>
+</login-module>
+</authentication>
+</application-policy>
+</policy>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>   
+   <!-- hooking in a login module for the standalone version of JSF Forums -->
+    <!-- The custom JAAS login configuration that installs 
+       a Configuration capable of dynamically updating the
+       config settings
+   -->
+   <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
+      name="jboss.security.tests:service=LoginConfig">
+      <attribute name="AuthConfig">META-INF/security-config.xml</attribute>
+      <depends optional-attribute-name="LoginConfigService">
+         jboss.security:service=XMLLoginConfig
+      </depends>
+      <depends optional-attribute-name="SecurityManagerService">
+         jboss.security:service=JaasSecurityManager
+      </depends>
+   </mbean>
+</server>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+   <mbean
+      code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+      name="portal.forums:service=Hibernate"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
+      <attribute name="DoChecking">true</attribute>
+      <attribute name="ConfigLocation">conf/hibernate/hibernate.cfg.xml</attribute>
+      <attribute name="SetupLocation">conf/hibernate/setup.txt</attribute>
+   </mbean>
+   <mbean
+      code="org.jboss.portlet.forums.impl.ForumsModuleImpl"
+      name="portal.forums:service=Module,type=Forums"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <!-- Flood interval in seconds -->
+      <attribute name="FloodInterval">30</attribute>
+      <!-- Guest user -->
+      <attribute name="GuestUserName">guest</attribute>
+      <!-- Email address used for FROM field of email notification -->
+      <attribute name="FromAddress">portal at example.com</attribute>
+      <attribute name="JNDIName">java:portal/ForumsModule</attribute>
+      <depends optional-attribute-name="Hibernate" proxy-type="attribute">portal.forums:service=Hibernate</depends>
+   </mbean>
+<!-- configure the AuthorizationContext for this application -->
+<mbean name="portal.forums:service=AuthorizationContext"
+       code="org.jboss.portlet.forums.auth.AuthorizationContextImpl" 	
+       xmbean-dd=""
+       >
+	<!-- plug-in an AuthorizationProvider that implements the AuthorizationInterface here -->
+	<attribute name="providerImpl">org.jboss.forums.security.AuthorizationProvider</attribute>
+	<xmbean>
+		<class>org.jboss.portlet.forums.auth.AuthorizationContextImpl</class>
+		<constructor>      				
+			<name>org.jboss.portlet.forums.auth.AuthorizationContextImpl</name>
+		</constructor>
+		<attribute access="write" setMethod="setProviderImpl">
+			<name>providerImpl</name>
+			<type>java.lang.String</type>					 
+		</attribute>
+		<attribute access="read-only" >
+			<name>provider</name>
+			<type>org.jboss.portlet.forums.auth.AuthorizationInterface</type>					 
+		</attribute>
+		<operation impact="INFO">
+			<description>Method for getting Provider</description>
+			<name>provider</name>
+			<return-type>org.jboss.portlet.forums.auth.AuthorizationInterface</return-type>
+		</operation>
+		<operation>
+			<description>The start lifecycle operation</description>
+			<name>start</name>
+		</operation>
+		<operation>
+			<description>The stop lifecycle operation</description>
+			<name>stop</name>
+		</operation>		    
+	</xmbean>
+</mbean>   
+</server>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,43 @@
+<?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="show_sql">false</property>
+      <property name="format_sql">false</property>
+
+      <!-- Use the C3P0 connection pool provider --> 
+      <property name="hibernate.c3p0.min_size">5</property> 
+      <property name="hibernate.c3p0.max_size">20</property> 
+      <property name="hibernate.c3p0.timeout">300</property> 
+      <property name="hibernate.c3p0.max_statements">50</property> 
+      <property name="hibernate.c3p0.idle_test_period">3000</property> 
+
+      <property name="cache.provider_class">org.jboss.portal.jems.hibernate.JMXTreeCacheProvider</property>
+      <property name="cache.object_name">portal:service=TreeCacheProvider,type=hibernate</property>
+         
+      <property name="hibernate.cache.use_query_cache">true</property>
+      <property name="hibernate.cache.use_second_level_cache">true</property>
+      <property name="hibernate.generate_statistics">true</property>
+      <property name="hibernate.cache.use_structured_entries">true</property>
+      <!-- Force the dialect instead of using autodetection -->
+      <!--
+      <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+      -->
+
+      <!-- Mapping files -->
+      <!-- Luca Stancapiano - I add ForumInstanceImpl to use with hibernate -->
+      <mapping resource="org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml"/>
+      <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"/>
+      <mapping resource="org/jboss/portlet/forums/impl/Queries.hbm.xml"/>
+   </session-factory>
+</hibernate-configuration>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,84 @@
+// This bsh script setup the default content of the portal.
+// It is called when the SessionFactoryBinder service has created a schema and needs to populate it
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portlet.forums.impl.CategoryImpl;
+import org.jboss.portlet.forums.impl.ForumImpl;
+// Luca Stancapiano -- import
+import org.jboss.portlet.forums.impl.ForumInstanceImpl;
+
+try
+{
+   session = SessionFactory.openSession();
+   tx = session.beginTransaction();
+
+   /* 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
+
+   //
+   CategoryImpl cat = new CategoryImpl();
+   cat.setOrder(10);
+   cat.setTitle("Dummy demo category");
+   cat.setForums(new java.util.ArrayList());
+   /* Luca Stancapiano start - I add the reference of forum instance for a category. 
+      The only updates from old database to new database are this field to mark 
+      references for forum instance and the forum instance table managed by 
+      ForumInstanceImpl class through hibernate */ 
+   cat.setForumInstance(fii);
+   // Luca Stancapiano end
+
+   //
+   ForumImpl forum1 = new ForumImpl();
+   forum1.setDescription("First description");
+   forum1.setCategory(cat);
+   forum1.setLastPost(null);
+   forum1.setName("First forum");
+   forum1.setOrder(10);
+   forum1.setTopicCount(0);
+   forum1.setPostCount(0);
+   forum1.setPruneEnable(true);
+   forum1.setPruneNext(0);
+   forum1.setStatus(0);
+   //forum1.setType(0);
+   ForumImpl forum2 = new ForumImpl();
+   forum2.setDescription("Second description");
+   forum2.setCategory(cat);
+   forum2.setLastPost(null);
+   forum2.setName("Second forum");
+   forum2.setOrder(20);
+   forum2.setTopicCount(0);
+   forum2.setPostCount(0);
+   forum2.setPruneEnable(true);
+   forum2.setPruneNext(0);
+   forum2.setStatus(0);
+   //forum2.setType(0);
+
+   //
+   //cat.getForums().add(forum1);
+   //cat.getForums().add(forum2);
+   cat.addForum(forum1);
+   cat.addForum(forum2);
+
+   // Luca Stancapiano start - I save ForumInstance record and all his children records
+   fii.addCategory(cat);
+   session.save(fii);
+   session.flush();
+   // Luca Stancapiano end
+
+   //
+   session.save(cat);
+   session.flush();
+   //session.save(forum1);
+   //session.save(forum2);
+   tx.commit();
+}
+finally
+{
+   session.close();
+}


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.AttachmentImpl"
+        table="jbp_forums_attachments"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_attachment_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-AttachmentImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="comment"
+            type="text"
+            update="true"
+            insert="true"
+            column="jbp_comment"
+        />
+
+        <component
+            name="file"
+            class="org.jboss.portlet.forums.impl.UploadedFileImpl"
+        >
+        <property
+            name="contentType"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_content_type"
+        />
+
+        <property
+            name="size"
+            type="long"
+            update="true"
+            insert="true"
+            column="jbp_size"
+        />
+
+        <property
+            name="name"
+            type="text"
+            update="true"
+            insert="true"
+            column="jbp_name"
+        />
+
+        <property
+            name="content"
+            type="blob"
+            update="true"
+            insert="true"
+            column="jbp_content"
+            length="100000000"
+        />
+
+        </component>
+
+        <many-to-one
+            name="post"
+            class="org.jboss.portlet.forums.impl.PostImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_post_id"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-AttachmentImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.CategoryImpl"
+        table="jbp_forums_categories"
+    >
+        <cache usage="transactional" />
+
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-CategoryImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <bag
+            name="forums"
+            table="jbp_forums_forums"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_order asc"
+        >
+            <cache 
+                usage="transactional" 
+            />
+
+            <key
+                column="jbp_category_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.ForumImpl"
+            />
+
+      </bag>
+
+        <property
+            name="order"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_order"
+            unique="false"
+        />
+
+        <property
+            name="title"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_title"
+            unique="false"
+        />
+
+        <many-to-one
+            name="forumInstance"
+            class="org.jboss.portlet.forums.impl.ForumInstanceImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_forum_instance_id"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-CategoryImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.ForumImpl"
+        table="jbp_forums_forums"
+    >
+        <cache usage="transactional" />
+
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-ForumImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="category"
+            class="org.jboss.portlet.forums.impl.CategoryImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_category_id"
+        />
+
+        <property
+            name="description"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_description"
+            unique="false"
+        />
+
+        <property
+            name="name"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_name"
+            unique="false"
+        />
+
+        <property
+            name="order"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_order"
+            unique="false"
+        />
+
+        <property
+            name="topicCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_topic_count"
+            unique="false"
+        />
+
+        <property
+            name="postCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_post_count"
+            unique="false"
+        />
+
+        <property
+            name="status"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_status"
+            unique="false"
+        />
+
+        <bag
+            name="topics"
+            table="jbp_forums_topics"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_last_post_date asc"
+        >
+
+            <key
+                column="jbp_forum_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.TopicImpl"
+            />
+
+      </bag>
+
+        <bag
+            name="forumWatch"
+            lazy="true"
+            inverse="true"
+            cascade="all"
+        >
+
+            <key
+                column="jbp_forum_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+            />
+
+      </bag>
+
+        <bag
+            name="watches"
+            lazy="true"
+            inverse="true"
+            cascade="all"
+        >
+
+            <key
+                column="jbp_forum_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+            />
+
+      </bag>
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-ForumImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.ForumInstanceImpl"
+        table="jbp_forums_instances"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="assigned">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-ForumInstanceImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="name"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_name"
+            unique="false"
+        />
+
+        <bag
+            name="categories"
+            table="jbp_forums_categories"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_order"
+        >
+
+            <key
+                column="jbp_forum_instance_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.CategoryImpl"
+            />
+
+      </bag>
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-ForumInstanceImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.PollImpl"
+        table="jbp_forums_polls"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_poll_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-PollImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <list
+            name="options"
+            table="jbp_forums_poll_option"
+            lazy="true"
+            cascade="all"
+        >
+
+            <key
+                column="jbp_poll_id"
+            >
+            </key>
+
+            <index
+                column="jbp_poll_option_position"
+            />
+
+            <composite-element
+                class="org.jboss.portlet.forums.impl.PollOptionImpl"
+            >
+        <property
+            name="votes"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_votes"
+            not-null="true"
+        />
+
+        <property
+            name="question"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_question"
+            not-null="true"
+        />
+
+            </composite-element>
+
+        </list>
+
+        <property
+            name="title"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_title"
+        />
+
+        <property
+            name="length"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_length"
+            unique="false"
+        />
+
+        <set
+            name="voted"
+            table="jbp_forums_poll_voted"
+            lazy="true"
+            cascade="all"
+            sort="unsorted"
+        >
+
+            <key
+                column="jbp_poll_id"
+            >
+            </key>
+
+            <element
+                column="jbp_poll_voted"
+                type="integer"
+                not-null="true"
+                unique="false"
+            />
+
+        </set>
+
+        <property
+            name="creationDate"
+            type="java.util.Date"
+            update="true"
+            insert="true"
+            column="jbp_creation_date"
+            not-null="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-PollImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.PostImpl"
+        table="jbp_forums_posts"
+    >
+        <cache usage="transactional" />
+
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-PostImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="topic"
+            class="org.jboss.portlet.forums.impl.TopicImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_topic_id"
+        />
+
+        <property
+            name="editCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_edit_count"
+            unique="false"
+        />
+
+        <property
+            name="editDate"
+            type="java.util.Date"
+            update="true"
+            insert="true"
+            column="jbp_edit_date"
+            unique="false"
+        />
+
+        <property
+            name="createDate"
+            type="java.util.Date"
+            update="false"
+            insert="true"
+            column="jbp_create_date"
+            unique="false"
+        />
+
+        <component
+            name="message"
+            class="org.jboss.portlet.forums.impl.MessageImpl"
+        >
+        <property
+            name="subject"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_subject"
+        />
+
+        <property
+            name="text"
+            type="text"
+            update="true"
+            insert="true"
+            column="jbp_text"
+        />
+
+        </component>
+
+        <many-to-one
+            name="poster"
+            class="org.jboss.portlet.forums.impl.PosterImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_poster_id"
+        />
+
+        <bag
+            name="attachments"
+            table="jbp_forums_attachments"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_name asc"
+        >
+
+            <key
+                column="jbp_post_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.AttachmentImpl"
+            />
+
+      </bag>
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-PostImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.PosterImpl"
+        table="jbp_forums_posters"
+    >
+        <cache usage="transactional" />
+
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-PosterImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="userId"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_user_id"
+            unique="true"
+        />
+
+        <property
+            name="postCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_post_count"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-PosterImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+
+	<query name="findForumByIdFetchTopics" cacheable="true"><![CDATA[select f
+                                        from ForumImpl f
+                                        left outer join fetch f.topics
+                                        where f.id = :forumId]]></query>
+	
+	<query name="findCategoryByIdFetchForums" cacheable="true"><![CDATA[from CategoryImpl as c
+                                        join fetch c.forums
+                                        where c.id=:categoryId]]></query>
+	
+	<query name="findPosterByUserId" cacheable="true"><![CDATA[from PosterImpl as u where u.userId=:userId]]></query>
+	
+	<query name="findCategories" cacheable="true"><![CDATA[from CategoryImpl as c
+							            where c.forumInstance.id = :forumInstanceId
+							            order by c.order asc]]></query>
+	
+	<query name="findCategoriesFetchForums" cacheable="true"><![CDATA[select c
+					                    from CategoryImpl as c
+					                    left outer join fetch c.forums
+					                    where c.forumInstance.id = :forumInstanceId
+					                    order by c.order asc]]></query>
+	
+	<query name="findForums" cacheable="true"><![CDATA[from ForumImpl as f
+							            where f.category.forumInstance.id = :forumInstanceId
+							            order by f.order asc]]></query>
+	
+	<query name="findForumsByCategoryId" cacheable="true"><![CDATA[from ForumImpl as f where f.category=:categoryId order by f.order asc]]></query>
+	
+	<query name="findAnnouncements" cacheable="true"><![CDATA[from TopicImpl as t where t.forum=:forumid and t.type = :type order by t.lastPostDate]]></query>
+	
+	<query name="findTopics" cacheable="true"><![CDATA[from TopicImpl as t
+					                    where t.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findTopicsTypeasc" cacheable="true"><![CDATA[from TopicImpl as t
+                                        join fetch t.poster
+                                        where t.forum = :forumid
+                                        and t.type = :type
+                                        order by t.lastPostDate asc]]></query>
+                                        
+	<query name="findTopicsTypedesc" cacheable="true"><![CDATA[from TopicImpl as t
+                                        join fetch t.poster
+                                        where t.forum = :forumid
+                                        and t.type = :type
+                                        order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicsForumasc" cacheable="true"><![CDATA[from TopicImpl as t
+                                        join fetch t.poster
+                                        where t.forum = :forumid
+                                        order by t.lastPostDate asc]]></query>
+	
+	<query name="findTopicsForumdesc" cacheable="true"><![CDATA[from TopicImpl as t
+                                        join fetch t.poster
+                                        where t.forum = :forumid
+                                        order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicsHot" cacheable="true"><![CDATA[from TopicImpl as t where t.replies > :replies
+							            and t.forum.category.forumInstance.id = :forumInstanceId
+							            order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicsByLatestPosts" cacheable="true"><![CDATA[from TopicImpl as t where t.forum.category.forumInstance.id = :forumInstanceId order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicsHottest" cacheable="true"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+							            and t.forum.category.forumInstance.id = :forumInstanceId
+							            order by t.replies desc]]></query>
+	
+	<query name="findTopicsMostViewed" cacheable="true"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+							            and t.forum.category.forumInstance.id = :forumInstanceId
+							            order by t.viewCount desc]]></query>
+	
+	<query name="getLastCategoryOrder" cacheable="true"><![CDATA[select max(c.order) from CategoryImpl as c where c.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="getLastForumOrder" cacheable="true"><![CDATA[select max(f.order) from ForumImpl as f where f.category = :categoryId]]></query>
+	
+	<query name="findTopicsForumNoOrder" cacheable="true"><![CDATA[from TopicImpl as t where t.forum = :forumid]]></query>
+	
+	<query name="findPosts" cacheable="true"><![CDATA[from PostImpl as p
+					                    where p.topic.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findPostsByTopicIdasc" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate asc]]></query>
+	
+	<query name="findPostsByTopicIddesc" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate desc]]></query>
+	
+	<query name="findPostsByIdsFetchAttachmentsAndPostersasc" cacheable="true"><![CDATA[from PostImpl as p
+                                        join fetch p.poster
+                                        left outer join fetch p.attachments
+                                        where p.id IN ( :postIds )
+                                        order by p.createDate asc]]></query>
+	
+	<query name="findPostsByIdsFetchAttachmentsAndPostersdesc" cacheable="true"><![CDATA[from PostImpl as p
+                                        join fetch p.poster
+                                        left outer join fetch p.attachments
+                                        where p.id IN ( :postIds )
+                                        order by p.createDate desc]]></query>
+	
+	<query name="findPostIdsasc" cacheable="true"><![CDATA[select p.id
+                                        from PostImpl as p
+                                        where p.topic=:topicId
+                                        order by p.createDate asc]]></query>
+	
+	<query name="findPostIdsdesc" cacheable="true"><![CDATA[select p.id
+                                        from PostImpl as p
+                                        where p.topic=:topicId
+                                        order by p.createDate desc]]></query>
+	
+	<query name="findPostsByTopicIdNoOrder" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId]]></query>
+	
+	<query name="findLastPostDateForUser" cacheable="true"><![CDATA[select max(p.createDate) from PostImpl as p where p.poster.userId = :userId]]></query>
+	
+	<query name="findLastPost" cacheable="true"><![CDATA[select p
+                                        from PostImpl as p
+                                        join fetch p.poster
+                                        where p.createDate = (
+                                           select DISTINCT MAX(topic.lastPostDate)
+                                           from TopicImpl as topic
+                                           where topic.forum = :forumId
+                                        )]]></query>
+	
+	<query name="findFirstPost" cacheable="true"><![CDATA[select p
+                                        from PostImpl as p
+                                        join fetch p.poster
+                                        where p.topic = :topicId
+                                        AND p.createDate = :lastPostDate]]></query>
+	
+	<query name="findLastPostOrder" cacheable="true"><![CDATA[from PostImpl as p where p.topic  = :topicId order by p.createDate desc]]></query>
+	
+	<query name="findLastPostsOfTopics" cacheable="true"><![CDATA[select topic.lastPostDate as maxDate , topic.id
+                                        from TopicImpl as topic
+                                        where topic.forum.id = :forumId]]></query>
+	
+	<query name="findLastPostsOfTopicsCreateDate" cacheable="true"><![CDATA[select post.createDate, post
+                                        from PostImpl as post
+                                        join fetch post.poster
+                                        where post.createDate IN (:dates)
+                                        order by post.createDate]]></query>
+	
+	<query name="findLastPostsOfForums" cacheable="true"><![CDATA[select MAX(topic.lastPostDate) as maxDate , topic.forum.id
+                                        from TopicImpl as topic
+      							        where topic.forum.category.forumInstance.id = :forumInstanceId
+                                        group by topic.forum.id]]></query>
+	
+	<query name="findLastPostsOfForumsCreateDate" cacheable="true"><![CDATA[select post.createDate, post
+                                        from PostImpl as post
+                                        join fetch post.poster
+                                        where post.createDate IN (:dates)
+                                        order by post.createDate]]></query>
+	
+	<query name="findForumWatchByUser" cacheable="true"><![CDATA[from ForumWatchImpl as f where f.poster.userId = :userId
+					                    and f.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findForumWatchedByUser" cacheable="true"><![CDATA[select f
+					                    from ForumImpl as f where f.id IN (
+					                    select fw.forum.id from ForumWatchImpl fw
+					                    where fw.poster.userId = :userId )
+					                    and f.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findTopicWatchedByUser" cacheable="true"><![CDATA[select t
+					                    from TopicImpl as t where t.id IN (
+					                    select tw.topic.id from TopicWatchImpl tw
+					                    where tw.poster.userId = :userId )
+					                    and t.forum.category.forumInstance.id = :forumInstanceId
+					                    order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicWatchedByUserCreateDate" cacheable="true"><![CDATA[select t
+					                    from TopicImpl as t where t.id IN (
+					                    select tw.topic.id from TopicWatchImpl tw
+					                    where tw.poster.userId = :userId )
+					                    and (t.lastPostDate > :datePoint)
+					                    and t.forum.category.forumInstance.id = :forumInstanceId
+					                    order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicWatches" cacheable="true"><![CDATA[select tw.topic.id , tw
+					                    from TopicWatchImpl tw
+					                    where tw.poster.userId = :userId
+					                    and tw.topic.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findPostsFromForumasc" cacheable="true"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+                                        asc]]></query>
+	
+	<query name="findPostsFromForumdesc" cacheable="true"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+                                        desc]]></query>
+	
+	<query name="findPostsFromCategoryasc" cacheable="true"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+                                        asc]]></query>
+	
+	<query name="findPostsFromCategorydesc" cacheable="true"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+                                        desc]]></query>
+	
+	<query name="findPostsOrderasc" cacheable="true"><![CDATA[select p from PostImpl as p order by p.createDate
+                                        asc]]></query>
+	
+	<query name="findPostsOrderdesc" cacheable="true"><![CDATA[select p from PostImpl as p order by p.createDate
+                                        desc]]></query>
+	
+	<query name="findForumWatchById" cacheable="true"><![CDATA[from ForumWatchImpl as f where f.id = :forumWatchId]]></query>
+	
+	<query name="findForumWatches" cacheable="true"><![CDATA[select fw.forum.id , fw
+                                        from ForumWatchImpl fw
+                                        where fw.poster.userId = :userId
+			                            and fw.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findForumWatchByUserAndForum" cacheable="true"><![CDATA[from ForumWatchImpl as fw
+                                        where fw.poster.userId = :userId
+                                        and fw.forum.id= :forumId]]></query>
+	
+	<query name="findTopicWatchByUserAndTopic" cacheable="true"><![CDATA[from TopicWatchImpl as tw
+                                        where tw.poster.userId = :userId
+                                        and tw.topic.id= :topicId]]></query>
+	
+	<query name="findTopicWatchById" cacheable="true"><![CDATA[from TopicWatchImpl as f where f.id = :topicWatchId]]></query>
+	
+	
+</hibernate-mapping>
\ No newline at end of file

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.TopicImpl"
+        table="jbp_forums_topics"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-TopicImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <bag
+            name="posts"
+            table="jbp_forums_posts"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_create_date asc"
+        >
+
+            <key
+                column="jbp_topic_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.PostImpl"
+            />
+
+      </bag>
+
+        <many-to-one
+            name="forum"
+            class="org.jboss.portlet.forums.impl.ForumImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_forum_id"
+        />
+
+        <property
+            name="viewCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_view_count"
+            unique="false"
+        />
+
+        <property
+            name="replies"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_replies"
+            unique="false"
+        />
+
+        <property
+            name="lastPostDate"
+            type="java.util.Date"
+            update="true"
+            insert="true"
+            column="jbp_last_post_date"
+            unique="false"
+        />
+
+        <many-to-one
+            name="poster"
+            class="org.jboss.portlet.forums.impl.PosterImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_poster"
+        />
+
+        <property
+            name="type"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_type"
+            unique="false"
+        />
+
+        <property
+            name="status"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_status"
+            unique="false"
+        />
+
+        <property
+            name="subject"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_subject"
+            unique="false"
+        />
+
+        <bag
+            name="watches"
+            lazy="true"
+            inverse="true"
+            cascade="all"
+        >
+
+            <key
+                column="jbp_topic_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.TopicWatchImpl"
+            />
+
+      </bag>
+
+        <many-to-one
+            name="poll"
+            class="org.jboss.portlet.forums.impl.PollImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_poll"
+            not-null="false"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-TopicImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.WatchImpl"
+        table="jbp_forums_watch"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-WatchImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="poster"
+            class="org.jboss.portlet.forums.impl.PosterImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_poster_id"
+        />
+
+        <property
+            name="mode"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_mode"
+            unique="false"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-WatchImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+        <joined-subclass
+            name="org.jboss.portlet.forums.impl.TopicWatchImpl"
+            table="jbp_forums_topicswatch"
+        >
+            <key
+                column="jbp_id"
+            />
+
+        <many-to-one
+            name="topic"
+            class="org.jboss.portlet.forums.impl.TopicImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_topic_id"
+        />
+
+        </joined-subclass>
+        <joined-subclass
+            name="org.jboss.portlet.forums.impl.ForumWatchImpl"
+            table="jbp_forums_forumswatch"
+        >
+            <key
+                column="jbp_id"
+            />
+
+        <many-to-one
+            name="forum"
+            class="org.jboss.portlet.forums.impl.ForumImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_forum_id"
+        />
+
+        </joined-subclass>
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+   <mbean
+      code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+      name="portal.forums:service=Hibernate"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
+      <attribute name="DoChecking">true</attribute>
+      <attribute name="ConfigLocation">conf/hibernate/hibernate.cfg.xml</attribute>
+      <attribute name="SetupLocation">conf/hibernate/setup.txt</attribute>
+   </mbean>
+   <mbean
+      code="org.jboss.portlet.forums.impl.ForumsModuleImpl"
+      name="portal.forums:service=Module,type=Forums"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <!-- Flood interval in seconds -->
+      <attribute name="FloodInterval">30</attribute>
+      <!-- Guest user -->
+      <attribute name="GuestUserName">guest</attribute>
+      <!-- Email address used for FROM field of email notification -->
+      <attribute name="FromAddress">portal at example.com</attribute>
+      <attribute name="JNDIName">java:portal/ForumsModule</attribute>
+      <depends optional-attribute-name="Hibernate" proxy-type="attribute">portal.forums:service=Hibernate</depends>
+   </mbean>
+<!-- configure the AuthorizationContext for this application -->
+<mbean name="portal.forums:service=AuthorizationContext"
+       code="org.jboss.portlet.forums.auth.AuthorizationContextImpl" 	
+       xmbean-dd=""
+       >
+	<!-- plug-in an AuthorizationProvider that implements the AuthorizationInterface here -->
+	<attribute name="providerImpl">org.jboss.forums.security.AuthorizationProvider</attribute>
+	<xmbean>
+		<class>org.jboss.portlet.forums.auth.AuthorizationContextImpl</class>
+		<constructor>      				
+			<name>org.jboss.portlet.forums.auth.AuthorizationContextImpl</name>
+		</constructor>
+		<attribute access="write" setMethod="setProviderImpl">
+			<name>providerImpl</name>
+			<type>java.lang.String</type>					 
+		</attribute>
+		<attribute access="read-only" >
+			<name>provider</name>
+			<type>org.jboss.portlet.forums.auth.AuthorizationInterface</type>					 
+		</attribute>
+		<operation impact="INFO">
+			<description>Method for getting Provider</description>
+			<name>provider</name>
+			<return-type>org.jboss.portlet.forums.auth.AuthorizationInterface</return-type>
+		</operation>
+		<operation>
+			<description>The start lifecycle operation</description>
+			<name>start</name>
+		</operation>
+		<operation>
+			<description>The stop lifecycle operation</description>
+			<name>stop</name>
+		</operation>		    
+	</xmbean>
+</mbean>   
+</server>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,43 @@
+<?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="show_sql">false</property>
+      <property name="format_sql">false</property>
+
+      <!-- Use the C3P0 connection pool provider --> 
+      <property name="hibernate.c3p0.min_size">5</property> 
+      <property name="hibernate.c3p0.max_size">20</property> 
+      <property name="hibernate.c3p0.timeout">300</property> 
+      <property name="hibernate.c3p0.max_statements">50</property> 
+      <property name="hibernate.c3p0.idle_test_period">3000</property> 
+
+      <property name="cache.provider_class">org.jboss.portlet.forums.util.cache.JMXTreeCacheProvider</property>
+      <property name="cache.object_name">forums:service=TreeCacheProvider,type=hibernate</property>
+         
+      <property name="hibernate.cache.use_query_cache">true</property>
+      <property name="hibernate.cache.use_second_level_cache">true</property>
+      <property name="hibernate.generate_statistics">true</property>
+      <property name="hibernate.cache.use_structured_entries">true</property>
+      <!-- Force the dialect instead of using autodetection -->
+      <!--
+      <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+      -->
+
+      <!-- Mapping files -->
+      <!-- Luca Stancapiano - I add ForumInstanceImpl to use with hibernate -->
+      <mapping resource="org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml"/>
+      <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"/>
+      <mapping resource="org/jboss/portlet/forums/impl/Queries.hbm.xml"/>
+   </session-factory>
+</hibernate-configuration>


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,84 @@
+// This bsh script setup the default content of the portal.
+// It is called when the SessionFactoryBinder service has created a schema and needs to populate it
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portlet.forums.impl.CategoryImpl;
+import org.jboss.portlet.forums.impl.ForumImpl;
+// Luca Stancapiano -- import
+import org.jboss.portlet.forums.impl.ForumInstanceImpl;
+
+try
+{
+   session = SessionFactory.openSession();
+   tx = session.beginTransaction();
+
+   /* 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
+
+   //
+   CategoryImpl cat = new CategoryImpl();
+   cat.setOrder(10);
+   cat.setTitle("Dummy demo category");
+   cat.setForums(new java.util.ArrayList());
+   /* Luca Stancapiano start - I add the reference of forum instance for a category. 
+      The only updates from old database to new database are this field to mark 
+      references for forum instance and the forum instance table managed by 
+      ForumInstanceImpl class through hibernate */ 
+   cat.setForumInstance(fii);
+   // Luca Stancapiano end
+
+   //
+   ForumImpl forum1 = new ForumImpl();
+   forum1.setDescription("First description");
+   forum1.setCategory(cat);
+   forum1.setLastPost(null);
+   forum1.setName("First forum");
+   forum1.setOrder(10);
+   forum1.setTopicCount(0);
+   forum1.setPostCount(0);
+   forum1.setPruneEnable(true);
+   forum1.setPruneNext(0);
+   forum1.setStatus(0);
+   //forum1.setType(0);
+   ForumImpl forum2 = new ForumImpl();
+   forum2.setDescription("Second description");
+   forum2.setCategory(cat);
+   forum2.setLastPost(null);
+   forum2.setName("Second forum");
+   forum2.setOrder(20);
+   forum2.setTopicCount(0);
+   forum2.setPostCount(0);
+   forum2.setPruneEnable(true);
+   forum2.setPruneNext(0);
+   forum2.setStatus(0);
+   //forum2.setType(0);
+
+   //
+   //cat.getForums().add(forum1);
+   //cat.getForums().add(forum2);
+   cat.addForum(forum1);
+   cat.addForum(forum2);
+
+   // Luca Stancapiano start - I save ForumInstance record and all his children records
+   fii.addCategory(cat);
+   session.save(fii);
+   //session.flush();
+   // Luca Stancapiano end
+
+   //
+   session.save(cat);
+   //session.flush();
+   //session.save(forum1);
+   //session.save(forum2);
+   tx.commit();
+}
+finally
+{
+   session.close();
+}


Property changes on: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.AttachmentImpl"
+        table="jbp_forums_attachments"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_attachment_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-AttachmentImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="comment"
+            type="text"
+            update="true"
+            insert="true"
+            column="jbp_comment"
+        />
+
+        <component
+            name="file"
+            class="org.jboss.portlet.forums.impl.UploadedFileImpl"
+        >
+        <property
+            name="contentType"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_content_type"
+        />
+
+        <property
+            name="size"
+            type="long"
+            update="true"
+            insert="true"
+            column="jbp_size"
+        />
+
+        <property
+            name="name"
+            type="text"
+            update="true"
+            insert="true"
+            column="jbp_name"
+        />
+
+        <property
+            name="content"
+            type="blob"
+            update="true"
+            insert="true"
+            column="jbp_content"
+            length="100000000"
+        />
+
+        </component>
+
+        <many-to-one
+            name="post"
+            class="org.jboss.portlet.forums.impl.PostImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_post_id"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-AttachmentImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.CategoryImpl"
+        table="jbp_forums_categories"
+    >
+        <cache usage="transactional" />
+
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-CategoryImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <bag
+            name="forums"
+            table="jbp_forums_forums"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_order asc"
+        >
+            <cache 
+                usage="transactional" 
+            />
+
+            <key
+                column="jbp_category_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.ForumImpl"
+            />
+
+      </bag>
+
+        <property
+            name="order"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_order"
+            unique="false"
+        />
+
+        <property
+            name="title"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_title"
+            unique="false"
+        />
+
+        <many-to-one
+            name="forumInstance"
+            class="org.jboss.portlet.forums.impl.ForumInstanceImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_forum_instance_id"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-CategoryImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.ForumImpl"
+        table="jbp_forums_forums"
+    >
+        <cache usage="transactional" />
+
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-ForumImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="category"
+            class="org.jboss.portlet.forums.impl.CategoryImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_category_id"
+        />
+
+        <property
+            name="description"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_description"
+            unique="false"
+        />
+
+        <property
+            name="name"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_name"
+            unique="false"
+        />
+
+        <property
+            name="order"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_order"
+            unique="false"
+        />
+
+        <property
+            name="topicCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_topic_count"
+            unique="false"
+        />
+
+        <property
+            name="postCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_post_count"
+            unique="false"
+        />
+
+        <property
+            name="status"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_status"
+            unique="false"
+        />
+
+        <bag
+            name="topics"
+            table="jbp_forums_topics"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_last_post_date asc"
+        >
+
+            <key
+                column="jbp_forum_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.TopicImpl"
+            />
+
+      </bag>
+
+        <bag
+            name="forumWatch"
+            lazy="true"
+            inverse="true"
+            cascade="all"
+        >
+
+            <key
+                column="jbp_forum_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+            />
+
+      </bag>
+
+        <bag
+            name="watches"
+            lazy="true"
+            inverse="true"
+            cascade="all"
+        >
+
+            <key
+                column="jbp_forum_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+            />
+
+      </bag>
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-ForumImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumInstanceImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.ForumInstanceImpl"
+        table="jbp_forums_instances"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="assigned">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-ForumInstanceImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="name"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_name"
+            unique="false"
+        />
+
+        <bag
+            name="categories"
+            table="jbp_forums_categories"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_order"
+        >
+
+            <key
+                column="jbp_forum_instance_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.CategoryImpl"
+            />
+
+      </bag>
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-ForumInstanceImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.PollImpl"
+        table="jbp_forums_polls"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_poll_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-PollImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <list
+            name="options"
+            table="jbp_forums_poll_option"
+            lazy="true"
+            cascade="all"
+        >
+
+            <key
+                column="jbp_poll_id"
+            >
+            </key>
+
+            <index
+                column="jbp_poll_option_position"
+            />
+
+            <composite-element
+                class="org.jboss.portlet.forums.impl.PollOptionImpl"
+            >
+        <property
+            name="votes"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_votes"
+            not-null="true"
+        />
+
+        <property
+            name="question"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_question"
+            not-null="true"
+        />
+
+            </composite-element>
+
+        </list>
+
+        <property
+            name="title"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_title"
+        />
+
+        <property
+            name="length"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_length"
+            unique="false"
+        />
+
+        <set
+            name="voted"
+            table="jbp_forums_poll_voted"
+            lazy="true"
+            cascade="all"
+            sort="unsorted"
+        >
+
+            <key
+                column="jbp_poll_id"
+            >
+            </key>
+
+            <element
+                column="jbp_poll_voted"
+                type="integer"
+                not-null="true"
+                unique="false"
+            />
+
+        </set>
+
+        <property
+            name="creationDate"
+            type="java.util.Date"
+            update="true"
+            insert="true"
+            column="jbp_creation_date"
+            not-null="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-PollImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.PostImpl"
+        table="jbp_forums_posts"
+    >
+        <cache usage="transactional" />
+
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-PostImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="topic"
+            class="org.jboss.portlet.forums.impl.TopicImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_topic_id"
+        />
+
+        <property
+            name="editCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_edit_count"
+            unique="false"
+        />
+
+        <property
+            name="editDate"
+            type="java.util.Date"
+            update="true"
+            insert="true"
+            column="jbp_edit_date"
+            unique="false"
+        />
+
+        <property
+            name="createDate"
+            type="java.util.Date"
+            update="false"
+            insert="true"
+            column="jbp_create_date"
+            unique="false"
+        />
+
+        <component
+            name="message"
+            class="org.jboss.portlet.forums.impl.MessageImpl"
+        >
+        <property
+            name="subject"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_subject"
+        />
+
+        <property
+            name="text"
+            type="text"
+            update="true"
+            insert="true"
+            column="jbp_text"
+        />
+
+        </component>
+
+        <many-to-one
+            name="poster"
+            class="org.jboss.portlet.forums.impl.PosterImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_poster_id"
+        />
+
+        <bag
+            name="attachments"
+            table="jbp_forums_attachments"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_name asc"
+        >
+
+            <key
+                column="jbp_post_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.AttachmentImpl"
+            />
+
+      </bag>
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-PostImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.PosterImpl"
+        table="jbp_forums_posters"
+    >
+        <cache usage="transactional" />
+
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-PosterImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="userId"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_user_id"
+            unique="true"
+        />
+
+        <property
+            name="postCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_post_count"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-PosterImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+
+	<query name="findForumByIdFetchTopics" cacheable="true"><![CDATA[select f
+                                        from ForumImpl f
+                                        left outer join fetch f.topics
+                                        where f.id = :forumId]]></query>
+	
+	<query name="findCategoryByIdFetchForums" cacheable="true"><![CDATA[from CategoryImpl as c
+                                        join fetch c.forums
+                                        where c.id=:categoryId]]></query>
+	
+	<query name="findPosterByUserId" cacheable="true"><![CDATA[from PosterImpl as u where u.userId=:userId]]></query>
+	
+	<query name="findCategories" cacheable="true"><![CDATA[from CategoryImpl as c
+							            where c.forumInstance.id = :forumInstanceId
+							            order by c.order asc]]></query>
+	
+	<query name="findCategoriesFetchForums" cacheable="true"><![CDATA[select c
+					                    from CategoryImpl as c
+					                    left outer join fetch c.forums
+					                    where c.forumInstance.id = :forumInstanceId
+					                    order by c.order asc]]></query>
+	
+	<query name="findForums" cacheable="true"><![CDATA[from ForumImpl as f
+							            where f.category.forumInstance.id = :forumInstanceId
+							            order by f.order asc]]></query>
+	
+	<query name="findForumsByCategoryId" cacheable="true"><![CDATA[from ForumImpl as f where f.category=:categoryId order by f.order asc]]></query>
+	
+	<query name="findAnnouncements" cacheable="true"><![CDATA[from TopicImpl as t where t.forum=:forumid and t.type = :type order by t.lastPostDate]]></query>
+	
+	<query name="findTopics" cacheable="true"><![CDATA[from TopicImpl as t
+					                    where t.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findTopicsTypeasc" cacheable="true"><![CDATA[from TopicImpl as t
+                                        join fetch t.poster
+                                        where t.forum = :forumid
+                                        and t.type = :type
+                                        order by t.lastPostDate asc]]></query>
+                                        
+	<query name="findTopicsTypedesc" cacheable="true"><![CDATA[from TopicImpl as t
+                                        join fetch t.poster
+                                        where t.forum = :forumid
+                                        and t.type = :type
+                                        order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicsForumasc" cacheable="true"><![CDATA[from TopicImpl as t
+                                        join fetch t.poster
+                                        where t.forum = :forumid
+                                        order by t.lastPostDate asc]]></query>
+	
+	<query name="findTopicsForumdesc" cacheable="true"><![CDATA[from TopicImpl as t
+                                        join fetch t.poster
+                                        where t.forum = :forumid
+                                        order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicsHot" cacheable="true"><![CDATA[from TopicImpl as t where t.replies > :replies
+							            and t.forum.category.forumInstance.id = :forumInstanceId
+							            order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicsByLatestPosts" cacheable="true"><![CDATA[from TopicImpl as t where t.forum.category.forumInstance.id = :forumInstanceId order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicsHottest" cacheable="true"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+							            and t.forum.category.forumInstance.id = :forumInstanceId
+							            order by t.replies desc]]></query>
+	
+	<query name="findTopicsMostViewed" cacheable="true"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+							            and t.forum.category.forumInstance.id = :forumInstanceId
+							            order by t.viewCount desc]]></query>
+	
+	<query name="getLastCategoryOrder" cacheable="true"><![CDATA[select max(c.order) from CategoryImpl as c where c.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="getLastForumOrder" cacheable="true"><![CDATA[select max(f.order) from ForumImpl as f where f.category = :categoryId]]></query>
+	
+	<query name="findTopicsForumNoOrder" cacheable="true"><![CDATA[from TopicImpl as t where t.forum = :forumid]]></query>
+	
+	<query name="findPosts" cacheable="true"><![CDATA[from PostImpl as p
+					                    where p.topic.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findPostsByTopicIdasc" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate asc]]></query>
+	
+	<query name="findPostsByTopicIddesc" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate desc]]></query>
+	
+	<query name="findPostsByIdsFetchAttachmentsAndPostersasc" cacheable="true"><![CDATA[from PostImpl as p
+                                        join fetch p.poster
+                                        left outer join fetch p.attachments
+                                        where p.id IN ( :postIds )
+                                        order by p.createDate asc]]></query>
+	
+	<query name="findPostsByIdsFetchAttachmentsAndPostersdesc" cacheable="true"><![CDATA[from PostImpl as p
+                                        join fetch p.poster
+                                        left outer join fetch p.attachments
+                                        where p.id IN ( :postIds )
+                                        order by p.createDate desc]]></query>
+	
+	<query name="findPostIdsasc" cacheable="true"><![CDATA[select p.id
+                                        from PostImpl as p
+                                        where p.topic=:topicId
+                                        order by p.createDate asc]]></query>
+	
+	<query name="findPostIdsdesc" cacheable="true"><![CDATA[select p.id
+                                        from PostImpl as p
+                                        where p.topic=:topicId
+                                        order by p.createDate desc]]></query>
+	
+	<query name="findPostsByTopicIdNoOrder" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId]]></query>
+	
+	<query name="findLastPostDateForUser" cacheable="true"><![CDATA[select max(p.createDate) from PostImpl as p where p.poster.userId = :userId]]></query>
+	
+	<query name="findLastPost" cacheable="true"><![CDATA[select p
+                                        from PostImpl as p
+                                        join fetch p.poster
+                                        where p.createDate = (
+                                           select DISTINCT MAX(topic.lastPostDate)
+                                           from TopicImpl as topic
+                                           where topic.forum = :forumId
+                                        )]]></query>
+	
+	<query name="findFirstPost" cacheable="true"><![CDATA[select p
+                                        from PostImpl as p
+                                        join fetch p.poster
+                                        where p.topic = :topicId
+                                        AND p.createDate = :lastPostDate]]></query>
+	
+	<query name="findLastPostOrder" cacheable="true"><![CDATA[from PostImpl as p where p.topic  = :topicId order by p.createDate desc]]></query>
+	
+	<query name="findLastPostsOfTopics" cacheable="true"><![CDATA[select topic.lastPostDate as maxDate , topic.id
+                                        from TopicImpl as topic
+                                        where topic.forum.id = :forumId]]></query>
+	
+	<query name="findLastPostsOfTopicsCreateDate" cacheable="true"><![CDATA[select post.createDate, post
+                                        from PostImpl as post
+                                        join fetch post.poster
+                                        where post.createDate IN (:dates)
+                                        order by post.createDate]]></query>
+	
+	<query name="findLastPostsOfForums" cacheable="true"><![CDATA[select MAX(topic.lastPostDate) as maxDate , topic.forum.id
+                                        from TopicImpl as topic
+      							        where topic.forum.category.forumInstance.id = :forumInstanceId
+                                        group by topic.forum.id]]></query>
+	
+	<query name="findLastPostsOfForumsCreateDate" cacheable="true"><![CDATA[select post.createDate, post
+                                        from PostImpl as post
+                                        join fetch post.poster
+                                        where post.createDate IN (:dates)
+                                        order by post.createDate]]></query>
+	
+	<query name="findForumWatchByUser" cacheable="true"><![CDATA[from ForumWatchImpl as f where f.poster.userId = :userId
+					                    and f.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findForumWatchedByUser" cacheable="true"><![CDATA[select f
+					                    from ForumImpl as f where f.id IN (
+					                    select fw.forum.id from ForumWatchImpl fw
+					                    where fw.poster.userId = :userId )
+					                    and f.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findTopicWatchedByUser" cacheable="true"><![CDATA[select t
+					                    from TopicImpl as t where t.id IN (
+					                    select tw.topic.id from TopicWatchImpl tw
+					                    where tw.poster.userId = :userId )
+					                    and t.forum.category.forumInstance.id = :forumInstanceId
+					                    order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicWatchedByUserCreateDate" cacheable="true"><![CDATA[select t
+					                    from TopicImpl as t where t.id IN (
+					                    select tw.topic.id from TopicWatchImpl tw
+					                    where tw.poster.userId = :userId )
+					                    and (t.lastPostDate > :datePoint)
+					                    and t.forum.category.forumInstance.id = :forumInstanceId
+					                    order by t.lastPostDate desc]]></query>
+	
+	<query name="findTopicWatches" cacheable="true"><![CDATA[select tw.topic.id , tw
+					                    from TopicWatchImpl tw
+					                    where tw.poster.userId = :userId
+					                    and tw.topic.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findPostsFromForumasc" cacheable="true"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+                                        asc]]></query>
+	
+	<query name="findPostsFromForumdesc" cacheable="true"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+                                        desc]]></query>
+	
+	<query name="findPostsFromCategoryasc" cacheable="true"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+                                        asc]]></query>
+	
+	<query name="findPostsFromCategorydesc" cacheable="true"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+                                        desc]]></query>
+	
+	<query name="findPostsOrderasc" cacheable="true"><![CDATA[select p from PostImpl as p order by p.createDate
+                                        asc]]></query>
+	
+	<query name="findPostsOrderdesc" cacheable="true"><![CDATA[select p from PostImpl as p order by p.createDate
+                                        desc]]></query>
+	
+	<query name="findForumWatchById" cacheable="true"><![CDATA[from ForumWatchImpl as f where f.id = :forumWatchId]]></query>
+	
+	<query name="findForumWatches" cacheable="true"><![CDATA[select fw.forum.id , fw
+                                        from ForumWatchImpl fw
+                                        where fw.poster.userId = :userId
+			                            and fw.forum.category.forumInstance.id = :forumInstanceId]]></query>
+	
+	<query name="findForumWatchByUserAndForum" cacheable="true"><![CDATA[from ForumWatchImpl as fw
+                                        where fw.poster.userId = :userId
+                                        and fw.forum.id= :forumId]]></query>
+	
+	<query name="findTopicWatchByUserAndTopic" cacheable="true"><![CDATA[from TopicWatchImpl as tw
+                                        where tw.poster.userId = :userId
+                                        and tw.topic.id= :topicId]]></query>
+	
+	<query name="findTopicWatchById" cacheable="true"><![CDATA[from TopicWatchImpl as f where f.id = :topicWatchId]]></query>
+	
+	
+</hibernate-mapping>
\ No newline at end of file

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.TopicImpl"
+        table="jbp_forums_topics"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-TopicImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <bag
+            name="posts"
+            table="jbp_forums_posts"
+            lazy="true"
+            inverse="true"
+            cascade="all-delete-orphan"
+            order-by="jbp_create_date asc"
+        >
+
+            <key
+                column="jbp_topic_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.PostImpl"
+            />
+
+      </bag>
+
+        <many-to-one
+            name="forum"
+            class="org.jboss.portlet.forums.impl.ForumImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_forum_id"
+        />
+
+        <property
+            name="viewCount"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_view_count"
+            unique="false"
+        />
+
+        <property
+            name="replies"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_replies"
+            unique="false"
+        />
+
+        <property
+            name="lastPostDate"
+            type="java.util.Date"
+            update="true"
+            insert="true"
+            column="jbp_last_post_date"
+            unique="false"
+        />
+
+        <many-to-one
+            name="poster"
+            class="org.jboss.portlet.forums.impl.PosterImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_poster"
+        />
+
+        <property
+            name="type"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_type"
+            unique="false"
+        />
+
+        <property
+            name="status"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_status"
+            unique="false"
+        />
+
+        <property
+            name="subject"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="jbp_subject"
+            unique="false"
+        />
+
+        <bag
+            name="watches"
+            lazy="true"
+            inverse="true"
+            cascade="all"
+        >
+
+            <key
+                column="jbp_topic_id"
+            >
+            </key>
+
+            <one-to-many
+                  class="org.jboss.portlet.forums.impl.TopicWatchImpl"
+            />
+
+      </bag>
+
+        <many-to-one
+            name="poll"
+            class="org.jboss.portlet.forums.impl.PollImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_poll"
+            not-null="false"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-TopicImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

Added: labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml	                        (rev 0)
+++ labs/jbossforums/branches/multipleforums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml	2008-02-07 18:52:19 UTC (rev 18392)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+    <class
+        name="org.jboss.portlet.forums.impl.WatchImpl"
+        table="jbp_forums_watch"
+    >
+        <cache usage="transactional" />
+        
+        <id
+            name="id"
+            column="jbp_id"
+            type="java.lang.Integer"
+        >
+            <generator class="native">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-WatchImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="poster"
+            class="org.jboss.portlet.forums.impl.PosterImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_poster_id"
+        />
+
+        <property
+            name="mode"
+            type="int"
+            update="true"
+            insert="true"
+            column="jbp_mode"
+            unique="false"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-WatchImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+        <joined-subclass
+            name="org.jboss.portlet.forums.impl.TopicWatchImpl"
+            table="jbp_forums_topicswatch"
+        >
+            <key
+                column="jbp_id"
+            />
+
+        <many-to-one
+            name="topic"
+            class="org.jboss.portlet.forums.impl.TopicImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_topic_id"
+        />
+
+        </joined-subclass>
+        <joined-subclass
+            name="org.jboss.portlet.forums.impl.ForumWatchImpl"
+            table="jbp_forums_forumswatch"
+        >
+            <key
+                column="jbp_id"
+            />
+
+        <many-to-one
+            name="forum"
+            class="org.jboss.portlet.forums.impl.ForumImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="jbp_forum_id"
+        />
+
+        </joined-subclass>
+
+    </class>
+
+</hibernate-mapping>




More information about the jboss-svn-commits mailing list