Revised spring-orm test suite (no AbstractJpaTests anymore)
Issue: SPR-13515
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="inheritsFromParentFactory" parent="inheritedTestBean">
|
||||
<property name="name"><value>override</value></property>
|
||||
<!-- age should inherit value of 1 from parent -->
|
||||
</bean>
|
||||
|
||||
<bean id="inheritsWithDifferentClass" class="org.springframework.tests.sample.beans.DerivedTestBean"
|
||||
parent="inheritedTestBean" init-method="initialize">
|
||||
<property name="name"><value>override</value></property>
|
||||
<!-- age should inherit value of 1 from parent -->
|
||||
</bean>
|
||||
|
||||
<bean id="inheritsWithClass" class="org.springframework.tests.sample.beans.DerivedTestBean"
|
||||
parent="inheritedTestBeanWithoutClass" init-method="initialize">
|
||||
<property name="name"><value>override</value></property>
|
||||
<!-- age should inherit value of 1 from parent -->
|
||||
</bean>
|
||||
|
||||
<bean id="protoypeInheritsFromParentFactorySingleton" parent="inheritedTestBean" scope="prototype">
|
||||
<property name="name"><value>prototypeOverridesInheritedSingleton</value></property>
|
||||
<!-- age should inherit value of 1 from parent -->
|
||||
</bean>
|
||||
|
||||
<bean id="prototypeInheritsFromParentFactoryPrototype" parent="inheritedTestBeanPrototype" scope="prototype">
|
||||
<property name="name"><value>prototype-override</value></property>
|
||||
<!-- age should inherit value of 2 from parent -->
|
||||
</bean>
|
||||
|
||||
<bean id="singletonInheritsFromParentFactoryPrototype" parent="inheritedTestBeanPrototype" scope="singleton">
|
||||
<property name="name"><value>prototype-override</value></property>
|
||||
<!-- age should inherit value of 2 from parent -->
|
||||
</bean>
|
||||
|
||||
<bean id="inheritedTestBean" parent="inheritedTestBean">
|
||||
<property name="name"><value>overrideParentBean</value></property>
|
||||
<!-- age should inherit value of 1 from parent -->
|
||||
</bean>
|
||||
|
||||
<bean id="bogusParent" parent="bogus" scope="prototype"/>
|
||||
|
||||
<bean id="indexedTestBean" class="org.springframework.tests.sample.beans.IndexedTestBean">
|
||||
<property name="array[0].name"><value>myname</value></property>
|
||||
</bean>
|
||||
|
||||
<bean parent="inheritedTestBean"/>
|
||||
|
||||
</beans>
|
||||
@@ -1,127 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="validEmptyWithDescription" class="org.springframework.tests.sample.beans.TestBean">
|
||||
<description>
|
||||
I have no properties and I'm happy without them.
|
||||
</description>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Check automatic creation of alias, to allow for names that are illegal as XML ids.
|
||||
-->
|
||||
<bean id="aliased" class=" org.springframework.tests.sample.beans.TestBean " name="myalias">
|
||||
<property name="name"><value>aliased</value></property>
|
||||
</bean>
|
||||
|
||||
<alias name="aliased" alias="youralias"/>
|
||||
|
||||
<alias name="multiAliased" alias="alias3"/>
|
||||
|
||||
<bean id="multiAliased" class="org.springframework.tests.sample.beans.TestBean" name="alias1,alias2">
|
||||
<property name="name"><value>aliased</value></property>
|
||||
</bean>
|
||||
|
||||
<alias name="multiAliased" alias="alias4"/>
|
||||
|
||||
<bean class="org.springframework.tests.sample.beans.TestBean" name="aliasWithoutId1,aliasWithoutId2,aliasWithoutId3">
|
||||
<property name="name"><value>aliased</value></property>
|
||||
</bean>
|
||||
|
||||
<bean class="org.springframework.tests.sample.beans.TestBean">
|
||||
<property name="name"><null/></property>
|
||||
</bean>
|
||||
|
||||
<bean class="org.springframework.beans.factory.xml.DummyReferencer"/>
|
||||
|
||||
<bean class="org.springframework.beans.factory.xml.DummyReferencer"/>
|
||||
|
||||
<bean class="org.springframework.beans.factory.xml.DummyReferencer"/>
|
||||
|
||||
<bean id="rod" class="org.springframework.tests.sample.beans.TestBean">
|
||||
<property name="name"><value><!-- a comment -->Rod</value></property>
|
||||
<property name="age"><value>31</value></property>
|
||||
<property name="spouse"><ref bean="father"/></property>
|
||||
<property name="touchy"><value/></property>
|
||||
</bean>
|
||||
|
||||
<bean id="roderick" parent="rod">
|
||||
<property name="name"><value>Roderick<!-- a comment --></value></property>
|
||||
<!-- Should inherit age -->
|
||||
</bean>
|
||||
|
||||
<bean id="kerry" class="org.springframework.tests.sample.beans.TestBean">
|
||||
<property name="name"><value>Ker<!-- a comment -->ry</value></property>
|
||||
<property name="age"><value>34</value></property>
|
||||
<property name="spouse"><ref bean="rod"/></property>
|
||||
<property name="touchy"><value></value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="kathy" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
|
||||
<property name="name"><value>Kathy</value></property>
|
||||
<property name="age"><value>28</value></property>
|
||||
<property name="spouse"><ref bean="father"/></property>
|
||||
</bean>
|
||||
|
||||
<bean id="typeMismatch" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
|
||||
<property name="name"><value>typeMismatch</value></property>
|
||||
<property name="age"><value>34x</value></property>
|
||||
<property name="spouse"><ref bean="rod"/></property>
|
||||
</bean>
|
||||
|
||||
<!-- Test of lifecycle callbacks -->
|
||||
<bean id="mustBeInitialized" class="org.springframework.tests.sample.beans.MustBeInitialized"/>
|
||||
|
||||
<bean id="lifecycle" class="org.springframework.tests.sample.beans.LifecycleBean"
|
||||
init-method="declaredInitMethod">
|
||||
<property name="initMethodDeclared"><value>true</value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="protectedLifecycle" class="org.springframework.beans.factory.xml.ProtectedLifecycleBean"
|
||||
init-method="declaredInitMethod">
|
||||
<property name="initMethodDeclared"><value>true</value></property>
|
||||
</bean>
|
||||
|
||||
<!-- Factory beans are automatically treated differently -->
|
||||
<bean id="singletonFactory" class="org.springframework.tests.sample.beans.factory.DummyFactory">
|
||||
</bean>
|
||||
|
||||
<bean id="prototypeFactory" class="org.springframework.tests.sample.beans.factory.DummyFactory">
|
||||
<property name="singleton"><value>false</value></property>
|
||||
</bean>
|
||||
|
||||
<!-- Check that the circular reference resolution mechanism doesn't break
|
||||
repeated references to the same FactoryBean -->
|
||||
<bean id="factoryReferencer" class="org.springframework.beans.factory.xml.DummyReferencer">
|
||||
<property name="testBean1"><ref bean="singletonFactory"/></property>
|
||||
<property name="testBean2"><ref bean="singletonFactory"/></property>
|
||||
<property name="dummyFactory"><ref bean="&singletonFactory"/></property>
|
||||
</bean>
|
||||
|
||||
<bean id="factoryReferencerWithConstructor" class="org.springframework.beans.factory.xml.DummyReferencer">
|
||||
<constructor-arg><ref bean="&singletonFactory"/></constructor-arg>
|
||||
<property name="testBean1"><ref bean="singletonFactory"/></property>
|
||||
<property name="testBean2"><ref bean="singletonFactory"/></property>
|
||||
</bean>
|
||||
|
||||
<!-- Check that the circular reference resolution mechanism doesn't break
|
||||
prototype instantiation -->
|
||||
<bean id="prototypeReferencer" class="org.springframework.beans.factory.xml.DummyReferencer" scope="prototype">
|
||||
<property name="testBean1"><ref bean="kathy"/></property>
|
||||
<property name="testBean2"><ref bean="kathy"/></property>
|
||||
</bean>
|
||||
|
||||
<bean id="listenerVeto" class="org.springframework.tests.sample.beans.TestBean">
|
||||
<property name="name"><value>listenerVeto</value></property>
|
||||
<property name="age"><value>66</value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="validEmpty" class="org.springframework.tests.sample.beans.TestBean"/>
|
||||
|
||||
<bean id="commentsInValue" class="org.springframework.tests.sample.beans.TestBean">
|
||||
<property name="name"><value>this is<!-- don't mind me --> a <![CDATA[<!--comment-->]]></value></property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBeanTests$FilterTestLocalSessionFactoryBean">
|
||||
<property name="filterDefinitions">
|
||||
<list>
|
||||
<bean class="org.springframework.orm.hibernate3.FilterDefinitionFactoryBean">
|
||||
<property name="filterName" value="filter1"/>
|
||||
<property name="parameterTypes">
|
||||
<props>
|
||||
<prop key="param1">string</prop>
|
||||
<prop key="otherParam">long</prop>
|
||||
</props>
|
||||
</property>
|
||||
<property name="defaultFilterCondition" value="someCondition"/>
|
||||
</bean>
|
||||
<bean id="filter2" class="org.springframework.orm.hibernate3.FilterDefinitionFactoryBean">
|
||||
<property name="parameterTypes">
|
||||
<props>
|
||||
<prop key="myParam">integer</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBeanTests$TypeTestLocalSessionFactoryBean">
|
||||
<property name="typeDefinitions">
|
||||
<list>
|
||||
<bean class="org.springframework.orm.hibernate3.TypeDefinitionBean">
|
||||
<property name="typeName" value="type1"/>
|
||||
<property name="typeClass" value="mypackage.MyTypeClass"/>
|
||||
<property name="parameters">
|
||||
<props>
|
||||
<prop key="param1">value1</prop>
|
||||
<prop key="otherParam">othervalue</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="type2" class="org.springframework.orm.hibernate3.TypeDefinitionBean">
|
||||
<property name="typeName" value="type2"/>
|
||||
<property name="typeClass" value="mypackage.MyOtherTypeClass"/>
|
||||
<property name="parameters">
|
||||
<props>
|
||||
<prop key="myParam">myvalue</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -17,6 +17,11 @@
|
||||
<property name="generateDdl" value="true"/>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="jpaPropertyMap">
|
||||
<props>
|
||||
<prop key="eclipselink.weaving">false</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
|
||||
|
||||
<beans>
|
||||
<context:annotation-config/>
|
||||
|
||||
<import resource="classpath:/org/springframework/orm/jpa/multi-jpa-emf.xml"/>
|
||||
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
|
||||
<context:load-time-weaver aspectj-weaving="on" />
|
||||
|
||||
<context:annotation-config />
|
||||
<beans>
|
||||
|
||||
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
|
||||
<property name="persistenceXmlLocation" value="org/springframework/orm/jpa/domain/persistence-context.xml"/>
|
||||
@@ -22,7 +16,6 @@
|
||||
<property name="jpaPropertyMap">
|
||||
<props>
|
||||
<prop key="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</prop>
|
||||
<!-- <prop key="hibernate.ejb.use_class_enhancer">true</prop> -->
|
||||
</props>
|
||||
</property>
|
||||
<property name="bootstrapExecutor">
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
|
||||
|
||||
<context:load-time-weaver aspectj-weaving="on"/>
|
||||
|
||||
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
|
||||
<property name="persistenceXmlLocation" value="org/springframework/orm/jpa/domain/persistence.xml"/>
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<property name="jpaVendorAdapter">
|
||||
<bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
|
||||
<property name="database" value="HSQL"/>
|
||||
<property name="showSql" value="true"/>
|
||||
<property name="generateDdl" value="true"/>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
|
||||
<property name="persistenceXmlLocation" value="org/springframework/orm/jpa/domain/persistence.xml"/>
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<property name="jpaVendorAdapter">
|
||||
<bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
|
||||
<property name="database" value="HSQL"/>
|
||||
<property name="showSql" value="true"/>
|
||||
<property name="generateDdl" value="true"/>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
Reference in New Issue
Block a user