Author: thomas.heute(a)jboss.com
Date: 2007-11-12 09:34:38 -0500 (Mon, 12 Nov 2007)
New Revision: 8877
Added:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/260/
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/260/instance/
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/260/instance/domain.hbm.xml
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/backward-jboss-beans.xml
Modified:
branches/JBoss_Portal_Branch_2_6/core/build.xml
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml
Log:
Ugly test case for schema update
Modified: branches/JBoss_Portal_Branch_2_6/core/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-11-12 12:05:59 UTC (rev 8876)
+++ branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-11-12 14:34:38 UTC (rev 8877)
@@ -611,7 +611,7 @@
<parameter name="CacheNaturalId" value="true"/>
<parameter name="Config"
value="persistent-jboss-beans.xml"/>
</zest>
-
+
<!--
<zest todir="${test.reports}"
name="org.jboss.portal.test.core.model.instance.InstanceContainerTestCase"
outfile="TEST-PersistedLocally-ClonedOnCreate-InstanceContainerTestCase">
@@ -633,6 +633,10 @@
outfile="TEST-RegistrationPersistenceManagerTestCase">
</zest>
+ <zest todir="${test.reports}"
name="org.jboss.portal.test.core.model.instance.BackwardCompatibilityInstanceTestCase">
+ <parameter name="Config"
value="backward-jboss-beans.xml"/>
+ </zest>
+
<test todir="${test.reports}"
name="org.jboss.portal.test.core.model.portal.PortalObjectPermissionTestCase"/>
<test todir="${test.reports}"
Added:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/260/instance/domain.hbm.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/260/instance/domain.hbm.xml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/260/instance/domain.hbm.xml 2007-11-12
14:34:38 UTC (rev 8877)
@@ -0,0 +1,163 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!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.portal.core.impl.model.instance.persistent.PersistentInstanceDefinition"
+ table="JBP_INSTANCE">
+ <cache usage="read-write"/>
+ <id
+ name="key"
+ column="PK"
+ access="field">
+ <generator class="native">
+ <param name="sequence">instance_seq</param>
+ </generator>
+ </id>
+ <natural-id>
+ <property
+ name="instanceId"
+ column="ID"
+ not-null="true"
+ unique="false"/>
+ </natural-id>
+ <property
+ name="portletRef"
+ column="PORTLET_REF"
+ not-null="false"
+ unique="false"/>
+ <property
+ name="mutable"
+ column="MODIFIABLE"
+ not-null="true"
+ unique="false"/>
+ <property
+ name="state"
+ column="SER_STATE"
+ not-null="false"
+ unique="false"
+ length="50000000"/>
+ <map
+ name="relatedSecurityBindings"
+ sort="unsorted"
+ inverse="true"
+ cascade="all-delete-orphan"
+ fetch="join">
+ <cache usage="read-write"/>
+ <key column="INSTANCE_PK"/>
+ <index column="ROLE" type="string"/>
+ <one-to-many
class="org.jboss.portal.core.impl.model.instance.persistent.PersistentRoleSecurityBinding"/>
+ </map>
+ <map
+ name="relatedCustomizations"
+ inverse="true"
+ cascade="save-update"
+ fetch="select"
+ lazy="extra">
+ <cache usage="read-write"/>
+ <key column="INSTANCE_PK"/>
+ <map-key
+ type="string"
+ column="USER_ID"/>
+ <one-to-many
class="org.jboss.portal.core.impl.model.instance.persistent.PersistentInstanceCustomization"/>
+ </map>
+ </class>
+
+ <class
+
name="org.jboss.portal.core.impl.model.instance.persistent.PersistentInstanceCustomization"
+ table="JBP_INSTANCE_PER_USER">
+ <cache usage="read-write"/>
+ <id
+ name="key"
+ column="PK"
+ access="field">
+ <generator class="native">
+ <param name="sequence">instance_seq</param>
+ </generator>
+ </id>
+ <many-to-one
+ name="relatedDefinition"
+ column="INSTANCE_PK"
+
class="org.jboss.portal.core.impl.model.instance.persistent.PersistentInstanceDefinition"
+ cascade="none"
+ fetch="select"/>
+ <property
+ name="state"
+ column="SER_STATE"
+ not-null="false"
+ unique="false"
+ length="50000000"/>
+ <properties
+ name="user_and_portlet_ref"
+ unique="true">
+ <property
+ name="customizationId"
+ column="USER_ID"
+ not-null="true"
+ length="160"/>
+ <property
+ name="portletRef"
+ column="PORTLET_REF"
+ not-null="true"
+ length="170"/>
+ </properties>
+ </class>
+
+ <class
+
name="org.jboss.portal.core.impl.model.instance.persistent.PersistentRoleSecurityBinding"
+ table="JBP_INSTANCE_SECURITY">
+ <cache usage="read-write"/>
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">instance_seq</param>
+ </generator>
+ </id>
+ <property
+ name="role"
+ column="ROLE"
+ not-null="true"
+ unique="false"/>
+ <set
+ name="actions"
+ table="JBP_INSTANCE_SECURITY_ACTIONS"
+ cascade="all-delete-orphan"
+ fetch="join">
+ <cache usage="read-write"/>
+ <key column="PK"/>
+ <element column="ACTIONS" type="string"/>
+ </set>
+ <many-to-one
+ name="instance"
+ column="INSTANCE_PK"
+
class="org.jboss.portal.core.impl.model.instance.persistent.PersistentInstanceDefinition"
+ cascade="none"
+ fetch="select"/>
+ </class>
+</hibernate-mapping>
Property changes on:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/260/instance/domain.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
Added:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/backward-jboss-beans.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/backward-jboss-beans.xml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/backward-jboss-beans.xml 2007-11-12
14:34:38 UTC (rev 8877)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<deployment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
+ xmlns="urn:jboss:bean-deployer">
+
+ <bean name="TestCaseConfig"
class="org.jboss.portal.test.core.model.instance.InstanceContainerTestCase">
+ <constructor factoryMethod="getBean">
+ <factory bean="BeanFactory"/>
+ <parameter>TestCaseConfig</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="DataSourceConfig"
class="org.jboss.portal.test.framework.embedded.DataSourceSupport$Config">
+ <constructor factoryMethod="getBean">
+ <factory bean="BeanFactory"/>
+ <parameter>DataSourceConfig</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="HibernateConfig"
class="org.jboss.portal.test.framework.embedded.HibernateSupport$Config">
+ <constructor factoryMethod="getBean">
+ <factory bean="BeanFactory"/>
+ <parameter>HibernateConfig</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="JNDISupport"
class="org.jboss.portal.test.framework.embedded.JNDISupport">
+ </bean>
+
+ <bean name="TransactionManagerSupport"
class="org.jboss.portal.test.framework.embedded.TransactionManagerSupport">
+ </bean>
+
+ <bean name="ConnectionManagerSupport"
class="org.jboss.portal.test.framework.embedded.ConnectionManagerSupport">
+ <property name="transactionManager"><inject
bean="TransactionManagerSupport"
property="transactionManager"/></property>
+ </bean>
+
+ <bean name="DataSourceSupport"
class="org.jboss.portal.test.framework.embedded.DataSourceSupport">
+ <property name="transactionManager"><inject
bean="TransactionManagerSupport"
property="transactionManager"/></property>
+ <property name="connectionManagerReference"><inject
bean="ConnectionManagerSupport"
+
property="connectionManagerReference"/></property>
+ <property name="config"><inject
bean="DataSourceConfig"/></property>
+ </bean>
+
+ <bean name="InstanceHibernateSupport260"
class="org.jboss.portal.test.framework.embedded.HibernateSupport">
+ <property name="config"><inject
bean="HibernateConfig"/></property>
+ <property name="mappings">
+ <list elementClass="java.lang.String">
+
<value>org/jboss/portal/test/core/model/260/instance/domain.hbm.xml</value>
+ </list>
+ </property>
+ <property
name="jNDIName">java:/InstanceSessionFactory260</property>
+ </bean>
+
+ <bean name="PortletHibernateSupport"
class="org.jboss.portal.test.framework.embedded.HibernateSupport">
+ <property name="config"><inject
bean="HibernateConfig"/></property>
+ <property name="mappings">
+ <list elementClass="java.lang.String">
+ <value>conf/hibernate/portlet/domain.hbm.xml</value>
+ </list>
+ </property>
+ <property
name="jNDIName">java:/PortletSessionFactory</property>
+ </bean>
+
+ <bean name="StateConverter"
class="org.jboss.portal.portlet.impl.state.StateConverterV0">
+ </bean>
+ <bean name="StateManagementPolicy"
class="org.jboss.portal.portlet.impl.state.StateManagementPolicyService">
+ <property name="persistLocally">true</property>
+ </bean>
+ <bean name="PersistenceManager"
+
class="org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager">
+ <property
name="sessionFactoryJNDIName">java:/PortletSessionFactory</property>
+ </bean>
+ <bean name="PortletContainer"
class="org.jboss.portal.test.core.model.instance.PortletInvokerSupport">
+ </bean>
+ <bean name="Producer"
class="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker">
+ <property name="persistenceManager"><inject
bean="PersistenceManager"/></property>
+ <property name="portletInvoker"><inject
bean="PortletContainer"/></property>
+ <property name="stateManagementPolicy"><inject
bean="StateManagementPolicy"/></property>
+ <property name="stateConverter"><inject
bean="StateConverter"/></property>
+ </bean>
+
+ <bean name="StackFactory"
class="org.jboss.portal.common.invocation.EmptyInterceptorStackFactory">
+ </bean>
+ <bean name="ContainerContext260"
+
class="org.jboss.portal.core.impl.model.instance.persistent.PersistentInstanceContainerContext">
+ <property
name="sessionFactoryJNDIName">java:/InstanceSessionFactory260</property>
+ <property name="cacheNaturalId">true</property>
+ </bean>
+ <bean name="InstanceContainer260"
class="org.jboss.portal.core.impl.model.instance.InstanceContainerImpl">
+ <property name="cloneOnCreate">true</property>
+ <property name="portletInvoker"><inject
bean="Producer"/></property>
+ <property name="containerContext"><inject
bean="ContainerContext260"/></property>
+ <property name="stackFactory"><inject
bean="StackFactory"/></property>
+ <property name="performSecurityChecks">false</property>
+ </bean>
+
+ <bean name="TestBean"
class="org.jboss.portal.test.core.model.instance.BackwardCompatibilityInstanceTestCase">
+ <constructor factoryMethod="getBean">
+ <factory bean="BeanFactory"/>
+ <parameter>TestBean</parameter>
+ </constructor>
+ <property name="portletContainer"><inject
bean="PortletContainer"/></property>
+ <property name="instanceHibernateSupport260"><inject
bean="InstanceHibernateSupport260"/></property>
+ <property name="portletHibernateSupport"><inject
bean="PortletHibernateSupport"/></property>
+ <property name="instanceContainer260"><inject
bean="InstanceContainer260"/></property>
+ <!-- property name="persistenceManager"><inject
bean="PersistenceManager"/></property-->
+ <!-- property name="producer"><inject
bean="Producer"/></property-->
+ <property name="mappings">
+ <list elementClass="java.lang.String">
+ <value>conf/hibernate/instance/domain.hbm.xml</value>
+ </list>
+ </property>
+ <property name="config"><inject
bean="HibernateConfig"/></property>
+ </bean>
+</deployment>
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml 2007-11-12
12:05:59 UTC (rev 8876)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml 2007-11-12
14:34:38 UTC (rev 8877)
@@ -74,6 +74,16 @@
<property
name="jNDIName">java:/InstanceSessionFactory</property>
</bean>
+ <bean name="Instance260HibernateSupport"
class="org.jboss.portal.test.framework.embedded.HibernateSupport">
+ <property name="config"><inject
bean="HibernateConfig"/></property>
+ <property name="mappings">
+ <list elementClass="java.lang.String">
+ <value>conf/test/hibernate/2.6.0/instance/domain.hbm.xml</value>
+ </list>
+ </property>
+ <property
name="jNDIName">java:/Instance260SessionFactory</property>
+ </bean>
+
<bean name="PortletHibernateSupport"
class="org.jboss.portal.test.framework.embedded.HibernateSupport">
<property name="config"><inject
bean="HibernateConfig"/></property>
<property name="mappings">
@@ -117,14 +127,29 @@
<property name="performSecurityChecks">false</property>
</bean>
+ <bean name="Container260Context"
+
class="org.jboss.portal.core.impl.model.instance.persistent.PersistentInstanceContainerContext">
+ <property
name="sessionFactoryJNDIName">java:/Instance260SessionFactory</property>
+ <property name="cacheNaturalId"><inject
bean="TestCaseConfig" property="cacheNaturalId"/></property>
+ </bean>
+ <bean name="Instance260Container"
class="org.jboss.portal.core.impl.model.instance.InstanceContainerImpl">
+ <property name="cloneOnCreate"><inject
bean="TestCaseConfig" property="cloneOnCreate"/></property>
+ <property name="portletInvoker"><inject
bean="Producer"/></property>
+ <property name="containerContext"><inject
bean="Container260Context"/></property>
+ <property name="stackFactory"><inject
bean="StackFactory"/></property>
+ <property name="performSecurityChecks">false</property>
+ </bean>
+
<bean name="TestBean"
class="org.jboss.portal.test.core.model.instance.InstanceContainerTestCase">
<constructor factoryMethod="getBean">
<factory bean="BeanFactory"/>
<parameter>TestBean</parameter>
</constructor>
<property name="instanceHibernateSupport"><inject
bean="InstanceHibernateSupport"/></property>
+ <property name="instance260HibernateSupport"><inject
bean="Instance260HibernateSupport"/></property>
<property name="portletHibernateSupport"><inject
bean="PortletHibernateSupport"/></property>
<property name="instanceContainer"><inject
bean="InstanceContainer"/></property>
+ <property name="instance260Container"><inject
bean="Instance260Container"/></property>
<property name="persistenceManager"><inject
bean="PersistenceManager"/></property>
<property name="producer"><inject
bean="Producer"/></property>
<property name="portletContainer"><inject
bean="PortletContainer"/></property>