Permalink
Browse files

updated myrestaurant-social to spring-data-graph 1.0.0.M02

  • Loading branch information...
1 parent afb9dfc commit 235d04213952b421073bb4efeff0038f4406f264 @jexp jexp committed Feb 17, 2011

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -7,8 +7,8 @@
<version>0.1.0.BUILD-SNAPSHOT</version>
<name>myrestaurants-social</name>
<properties>
- <spring.version>3.0.4.RELEASE</spring.version>
- <spring-data-graph.version>1.0.0.M1</spring-data-graph.version>
+ <spring.version>3.0.5.RELEASE</spring.version>
+ <spring-data-graph.version>1.0.0.M2</spring-data-graph.version>
<aspectj.version>1.6.10.RELEASE</aspectj.version>
<slf4j.version>1.6.1</slf4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -76,94 +76,9 @@
<jdbc:script location="classpath:restaurants-sample-data.sql"/>
</jdbc:embedded-database>
- <tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/>
+ <bean class="com.springone.myrestaurants.DataStoreConfig"/>
- <bean id="neo4jNodeBacking" class="org.springframework.data.graph.neo4j.support.node.Neo4jNodeBacking" factory-method="aspectOf">
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="nodeEntityStateAccessorsFactory" ref="nodeEntityStateAccessorsFactory"/>
- </bean>
-
- <bean class="org.springframework.data.graph.neo4j.support.relationship.Neo4jRelationshipBacking" factory-method="aspectOf">
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="relationshipEntityStateAccessorsFactory" ref="relationshipEntityStateAccessorsFactory"/>
- </bean>
-
- <bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase"
- destroy-method="shutdown" scope="singleton">
- <constructor-arg index="0" value="target/data/recommendation" />
- </bean>
-
- <bean id="indexService" class="org.neo4j.index.lucene.LuceneIndexService" destroy-method="shutdown">
- <constructor-arg index="0" ref="graphDatabaseService" />
- </bean>
-
- <bean id="graphDatabaseContext" class="org.springframework.data.graph.neo4j.support.GraphDatabaseContext">
- <property name="graphDatabaseService" ref="graphDatabaseService"/>
- <property name="indexService" ref="indexService"/>
- <property name="relationshipEntityInstantiator">
- <bean class="org.springframework.data.graph.neo4j.support.relationship.ConstructorBypassingGraphRelationshipInstantiator" />
- </property>
- <property name="graphEntityInstantiator">
- <bean class="org.springframework.data.graph.neo4j.support.node.PartialNeo4jEntityInstantiator">
- <property name="entityInstantiator" >
- <bean class="org.springframework.data.graph.neo4j.support.node.Neo4jConstructorGraphEntityInstantiator"/>
- </property>
- </bean>
- </property>
- <property name="conversionService">
- <bean class="org.springframework.data.graph.neo4j.fieldaccess.Neo4jConversionServiceFactoryBean"/>
- </property>
- <property name="nodeTypeStrategy">
- <bean class="org.springframework.data.graph.neo4j.support.SubReferenceNodeTypeStrategy">
- <constructor-arg index="0" ref="graphDatabaseContext"/>
- </bean>
- </property>
- </bean>
-
- <bean id="nodeEntityStateAccessorsFactory" class="org.springframework.data.graph.neo4j.fieldaccess.NodeEntityStateAccessorsFactory">
- <property name="nodeDelegatingFieldAccessorFactory">
- <bean class="org.springframework.data.graph.neo4j.fieldaccess.NodeDelegatingFieldAccessorFactory">
- <constructor-arg ref="graphDatabaseContext"/>
- <constructor-arg ref="finderFactory"/>
- </bean>
- </property>
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="finderFactory" ref="finderFactory"/>
- </bean>
-
- <bean id="relationshipEntityStateAccessorsFactory" class="org.springframework.data.graph.neo4j.fieldaccess.RelationshipEntityStateAccessorsFactory">
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="finderFactory" ref="finderFactory"/>
- </bean>
-
- <bean id="finderFactory" class="org.springframework.data.graph.neo4j.finder.FinderFactory">
- <constructor-arg ref="graphDatabaseContext" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.persistence.transaction.NaiveDoubleTransactionManager" >
- <constructor-arg>
- <bean class="org.springframework.orm.jpa.JpaTransactionManager" id="jpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
- </constructor-arg>
- <constructor-arg>
- <bean
- class="org.springframework.transaction.jta.JtaTransactionManager">
- <property name="transactionManager" ref="neo4jTransactionManagerService" />
- <property name="userTransaction" ref="neo4jUserTransactionService" />
- </bean>
- </constructor-arg>
- </bean>
-
- <bean id="neo4jTransactionManagerService" class="org.neo4j.kernel.impl.transaction.SpringTransactionManager" >
- <constructor-arg index="0" ref="graphDatabaseService" />
- </bean>
-
- <bean id="neo4jUserTransactionService" class="org.neo4j.kernel.impl.transaction.UserTransactionImpl">
- <constructor-arg index="0" ref="graphDatabaseService" />
- </bean>
-
- <bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory" depends-on="neo4jNodeBacking">
+ <bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory"> <!-- depends-on="neo4jNodeBacking" -->
<property name="dataSource" ref="dataSource"/>
</bean>
@@ -19,69 +19,9 @@
<!--
Graph datastore config
-->
- <bean id="neo4jNodeBacking" class="org.springframework.data.graph.neo4j.support.node.Neo4jNodeBacking" factory-method="aspectOf">
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="nodeEntityStateAccessorsFactory" ref="nodeEntityStateAccessorsFactory"/>
- </bean>
-
- <bean class="org.springframework.data.graph.neo4j.support.relationship.Neo4jRelationshipBacking" factory-method="aspectOf">
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="relationshipEntityStateAccessorsFactory" ref="relationshipEntityStateAccessorsFactory"/>
- </bean>
-
- <bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase"
- destroy-method="shutdown" scope="singleton">
- <constructor-arg index="0" value="target/data/test" />
- </bean>
-
- <bean id="indexService" class="org.neo4j.index.lucene.LuceneIndexService" destroy-method="shutdown">
- <constructor-arg index="0" ref="graphDatabaseService" />
- </bean>
-
- <bean id="graphDatabaseContext" class="org.springframework.data.graph.neo4j.support.GraphDatabaseContext">
- <property name="graphDatabaseService" ref="graphDatabaseService"/>
- <property name="indexService" ref="indexService"/>
- <property name="relationshipEntityInstantiator">
- <bean class="org.springframework.data.graph.neo4j.support.relationship.ConstructorBypassingGraphRelationshipInstantiator" />
- </property>
- <property name="graphEntityInstantiator">
- <bean class="org.springframework.data.graph.neo4j.support.node.PartialNeo4jEntityInstantiator">
- <property name="entityInstantiator" >
- <bean class="org.springframework.data.graph.neo4j.support.node.Neo4jConstructorGraphEntityInstantiator"/>
- </property>
- </bean>
- </property>
- <property name="conversionService">
- <bean class="org.springframework.data.graph.neo4j.fieldaccess.Neo4jConversionServiceFactoryBean"/>
- </property>
- <property name="nodeTypeStrategy">
- <bean class="org.springframework.data.graph.neo4j.support.SubReferenceNodeTypeStrategy">
- <constructor-arg index="0" ref="graphDatabaseContext"/>
- </bean>
- </property>
- </bean>
-
- <bean id="nodeEntityStateAccessorsFactory" class="org.springframework.data.graph.neo4j.fieldaccess.NodeEntityStateAccessorsFactory">
- <property name="nodeDelegatingFieldAccessorFactory">
- <bean class="org.springframework.data.graph.neo4j.fieldaccess.NodeDelegatingFieldAccessorFactory">
- <constructor-arg ref="graphDatabaseContext"/>
- <constructor-arg ref="finderFactory"/>
- </bean>
- </property>
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="finderFactory" ref="finderFactory"/>
- </bean>
-
- <bean id="relationshipEntityStateAccessorsFactory" class="org.springframework.data.graph.neo4j.fieldaccess.RelationshipEntityStateAccessorsFactory">
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="finderFactory" ref="finderFactory"/>
- </bean>
-
-
- <bean id="finderFactory" class="org.springframework.data.graph.neo4j.finder.FinderFactory">
- <constructor-arg ref="graphDatabaseContext" />
- </bean>
-
+ <context:annotation-config/>
+ <bean class="com.springone.myrestaurants.DataStoreTestConfig"/>
+ <bean class="org.springframework.context.annotation.ConfigurationClassPostProcessor"/>
<!--
JPA config
-->
@@ -90,35 +30,8 @@
<jdbc:script location="classpath:restaurants-sample-data.sql"/>
</jdbc:embedded-database>
- <bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory" depends-on="neo4jNodeBacking">
+ <bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory"><!--depends-on="neo4jNodeBacking"-->
<property name="dataSource" ref="dataSource"/>
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/>
</bean>
-
- <!--
- TX config
- -->
- <bean id="neo4jTransactionManagerService" class="org.neo4j.kernel.impl.transaction.SpringTransactionManager" >
- <constructor-arg index="0" ref="graphDatabaseService" />
- </bean>
-
- <bean id="neo4jUserTransactionService" class="org.neo4j.kernel.impl.transaction.UserTransactionImpl">
- <constructor-arg index="0" ref="graphDatabaseService" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.persistence.transaction.NaiveDoubleTransactionManager" >
- <constructor-arg>
- <bean class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
- </constructor-arg>
- <constructor-arg>
- <bean
- class="org.springframework.transaction.jta.JtaTransactionManager">
- <property name="transactionManager" ref="neo4jTransactionManagerService" />
- <property name="userTransaction" ref="neo4jUserTransactionService" />
- </bean>
- </constructor-arg>
- </bean>
-
</beans>
@@ -16,6 +16,8 @@
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+ <import resource="DataStore-context.xml"/>
+
<context:spring-configured/>
<context:component-scan base-package="com.springone.myrestaurants">
@@ -24,6 +26,5 @@
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/>
- <import resource="DataStore-context.xml"/>
-
+
</beans>
@@ -16,6 +16,8 @@
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+ <import resource="DataStore-context.xml"/>
+
<context:spring-configured/>
<context:component-scan base-package="com.springone.myrestaurants">
@@ -24,6 +26,5 @@
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/>
- <import resource="DataStore-context.xml"/>
-
+
</beans>
@@ -16,6 +16,8 @@
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+ <import resource="DataStore-context.xml"/>
+
<context:spring-configured/>
<context:component-scan base-package="com.springone.myrestaurants">
@@ -24,6 +26,5 @@
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/>
- <import resource="DataStore-context.xml"/>
-
+
</beans>
@@ -19,106 +19,19 @@
<!--
Graph datastore config
-->
- <bean id="neo4jNodeBacking" class="org.springframework.data.graph.neo4j.support.node.Neo4jNodeBacking" factory-method="aspectOf">
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="nodeEntityStateAccessorsFactory" ref="nodeEntityStateAccessorsFactory"/>
- </bean>
- <bean class="org.springframework.data.graph.neo4j.support.relationship.Neo4jRelationshipBacking" factory-method="aspectOf">
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="relationshipEntityStateAccessorsFactory" ref="relationshipEntityStateAccessorsFactory"/>
- </bean>
+ <bean class="com.springone.myrestaurants.DataStoreTestConfig"/>
- <bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase"
- destroy-method="shutdown" scope="singleton">
- <constructor-arg index="0" value="target/data/test" />
- </bean>
-
- <bean id="indexService" class="org.neo4j.index.lucene.LuceneIndexService" destroy-method="shutdown">
- <constructor-arg index="0" ref="graphDatabaseService" />
- </bean>
-
- <bean id="graphDatabaseContext" class="org.springframework.data.graph.neo4j.support.GraphDatabaseContext">
- <property name="graphDatabaseService" ref="graphDatabaseService"/>
- <property name="indexService" ref="indexService"/>
- <property name="relationshipEntityInstantiator">
- <bean class="org.springframework.data.graph.neo4j.support.relationship.ConstructorBypassingGraphRelationshipInstantiator" />
- </property>
- <property name="graphEntityInstantiator">
- <bean class="org.springframework.data.graph.neo4j.support.node.PartialNeo4jEntityInstantiator">
- <property name="entityInstantiator" >
- <bean class="org.springframework.data.graph.neo4j.support.node.Neo4jConstructorGraphEntityInstantiator"/>
- </property>
- </bean>
- </property>
- <property name="conversionService">
- <bean class="org.springframework.data.graph.neo4j.fieldaccess.Neo4jConversionServiceFactoryBean"/>
- </property>
- <property name="nodeTypeStrategy">
- <bean class="org.springframework.data.graph.neo4j.support.SubReferenceNodeTypeStrategy">
- <constructor-arg index="0" ref="graphDatabaseContext"/>
- </bean>
- </property>
- </bean>
-
- <bean id="nodeEntityStateAccessorsFactory" class="org.springframework.data.graph.neo4j.fieldaccess.NodeEntityStateAccessorsFactory">
- <property name="nodeDelegatingFieldAccessorFactory">
- <bean class="org.springframework.data.graph.neo4j.fieldaccess.NodeDelegatingFieldAccessorFactory">
- <constructor-arg ref="graphDatabaseContext"/>
- <constructor-arg ref="finderFactory"/>
- </bean>
- </property>
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="finderFactory" ref="finderFactory"/>
- </bean>
-
- <bean id="relationshipEntityStateAccessorsFactory" class="org.springframework.data.graph.neo4j.fieldaccess.RelationshipEntityStateAccessorsFactory">
- <property name="graphDatabaseContext" ref="graphDatabaseContext"/>
- <property name="finderFactory" ref="finderFactory"/>
- </bean>
-
-
- <bean id="finderFactory" class="org.springframework.data.graph.neo4j.finder.FinderFactory">
- <constructor-arg ref="graphDatabaseContext" />
- </bean>
-
- <!--
+ <!--
JPA config
-->
<jdbc:embedded-database id="dataSource" type="HSQL">
<!-- <jdbc:script location="classpath:schema.sql"/>
<jdbc:script location="classpath:restaurants-sample-data.sql"/> -->
</jdbc:embedded-database>
- <bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory" depends-on="neo4jNodeBacking">
+ <bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory"><!-- depends-on="neo4jNodeBacking"-->
<property name="dataSource" ref="dataSource"/>
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/>
</bean>
-
- <!--
- TX config
- -->
- <bean id="neo4jTransactionManagerService" class="org.neo4j.kernel.impl.transaction.SpringTransactionManager" >
- <constructor-arg index="0" ref="graphDatabaseService" />
- </bean>
-
- <bean id="neo4jUserTransactionService" class="org.neo4j.kernel.impl.transaction.UserTransactionImpl">
- <constructor-arg index="0" ref="graphDatabaseService" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.persistence.transaction.NaiveDoubleTransactionManager" >
- <constructor-arg>
- <bean class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
- </constructor-arg>
- <constructor-arg>
- <bean
- class="org.springframework.transaction.jta.JtaTransactionManager">
- <property name="transactionManager" ref="neo4jTransactionManagerService" />
- <property name="userTransaction" ref="neo4jUserTransactionService" />
- </bean>
- </constructor-arg>
- </bean>
-
</beans>

0 comments on commit 235d042

Please sign in to comment.