You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2012/03/23 13:13:24 UTC

svn commit: r1304301 - in /incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src: main/resources/ test/resources/

Author: mfranklin
Date: Fri Mar 23 12:13:23 2012
New Revision: 1304301

URL: http://svn.apache.org/viewvc?rev=1304301&view=rev
Log:
Moved application context from opensocial-provider-core main to test (Supports RAVE-524)

Added:
    incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/initial_data.sql
      - copied unchanged from r1304163, incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig/src/main/resources/initial_data.sql
Removed:
    incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/resources/initial_data.sql
    incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/resources/modules-context.xml
    incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/resources/rave-shindig-applicationContext.xml
    incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/resources/rave-shindig-dataContext.xml
Modified:
    incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/rave-shindig-test-applicationContext.xml

Modified: incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/rave-shindig-test-applicationContext.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/rave-shindig-test-applicationContext.xml?rev=1304301&r1=1304300&r2=1304301&view=diff
==============================================================================
--- incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/rave-shindig-test-applicationContext.xml (original)
+++ incubator/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/resources/rave-shindig-test-applicationContext.xml Fri Mar 23 12:13:23 2012
@@ -18,8 +18,74 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xmlns:p="http://www.springframework.org/schema/p"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
+        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
+        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd">
 
-    <import resource="classpath:rave-shindig-applicationContext.xml"/>
+    <!-- make the the rave.shindig.properties props available to autowire injectors, location of the properties can
+     be overridden by setting a system property "rave-shindig.override.properties" -->
+    <bean id="shindigPropertyPlaceholder" class="org.apache.rave.util.OverridablePropertyPlaceholderConfigurer">
+        <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
+        <property name="systemPropertyName" value="rave-shindig.override.properties"/>
+        <property name="location" value="classpath:rave.shindig.properties"/>
+    </bean>
+
+    <!-- bean post-processor for JPA annotations -->
+    <context:annotation-config/>
+
+    <!-- enable the use of the @AspectJ style of Spring AOP -->
+    <aop:aspectj-autoproxy />
+
+    <context:component-scan base-package="org.apache.rave.commoncontainer" annotation-config="true"/>
+    <context:component-scan base-package="org.apache.rave.gadgets" annotation-config="true"/>
+    <context:component-scan base-package="org.apache.rave.inject" annotation-config="true"/>
+    <context:component-scan base-package="org.apache.rave.portal.model" annotation-config="true"/>
+    <context:component-scan base-package="org.apache.rave.portal.repository" annotation-config="true"/>
+    <context:component-scan base-package="org.apache.rave.opensocial" annotation-config="true"/>
+    <context:component-scan base-package="org.apache.rave.service" annotation-config="true"/>
+
+    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+        <property name="entityManagerFactory" ref="entityManagerFactory"/>
+    </bean>
+
+    <tx:annotation-driven transaction-manager="transactionManager"/>
+
+    <bean id="entityManagerFactory"
+          class="org.apache.rave.persistence.jpa.PopulatedLocalContainerEntityManagerFactory">
+        <property name="persistenceUnitName" value="raveShindigPersistenceUnit"/>
+        <property name="dataSource" ref="dataSource"/>
+        <property name="populator" ref="dataSourcePopulator"/>
+        <property name="jpaVendorAdapter">
+            <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter"
+                  p:databasePlatform="${rave-shindig.jpaVendorAdapter.databasePlatform}"
+                  p:database="${rave-shindig.jpaVendorAdapter.database}"
+                  p:showSql="${rave-shindig.jpaVendorAdapter.showSql}"/>
+        </property>
+        <property name="jpaPropertyMap">
+            <map>
+                <entry key="openjpa.Log" value="${rave-shindig.openjpa.Log}"/>
+                <entry key="openjpa.RuntimeUnenhancedClasses" value="${rave-shindig.openjpa.RuntimeUnenhancedClasses}"/>
+                <entry key="openjpa.jdbc.SynchronizeMappings" value="${rave-shindig.openjpa.jdbc.SynchronizeMappings}"/>
+            </map>
+        </property>
+    </bean>
+
+    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+        <property name="url" value="${rave-shindig.dataSource.url}"/>
+        <property name="driverClassName" value="${rave-shindig.dataSource.driver}"/>
+        <property name="username" value="${rave-shindig.dataSource.username}"/>
+        <property name="password" value="${rave-shindig.dataSource.password}"/>
+    </bean>
+
+    <bean id="oAuthStore" class="org.apache.rave.gadgets.oauth.inject.DefaultOAuthStore">
+        <constructor-arg name="defaultCallbackUrl" value="${shindig.signing.global-callback-url}"/>
+        <constructor-arg name="pathToPrivateKey" value="${shindig.signing.key-file}"/>
+        <constructor-arg name="privateKeyName" value="${shindig.signing.key-name}"/>
+    </bean>
 
 </beans>