Results 1 to 3 of 3

Thread: Configuring transactions with Neo4J 1.7 - old way no longer working!

Hybrid View

  1. #1

    Default Configuring transactions with Neo4J 1.7 - old way no longer working!

    Hi,
    I have just upgraded to Neo4J 1.7 and the old way of configuring transactions (still present in the 2.1.0-SNAPSHOT docs) doesn't seem to work any more:
    Code:
    <property name="userTransaction">
       <bean class="org.neo4j.kernel.impl.transaction.UserTransactionImpl">
          <constructor-arg ref="graphDatabaseService" />
       </bean>
    </property>
    The UserTransactionImpl no longer has that constructor:
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.neo4j.kernel.impl.transaction.UserTransaction Impl#105c552f' defined in file [...]: Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)

    Is the new way of configuring the transactions documented somewhere? Also, should the main docs be updated?
    Thanks.
    Eugen.

  2. #2
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    Sorry this was a breaking change in Neo4j 1.7 (which will be reverted in 1.8).

    Could you temporarily change it to this EL construct:

    Code:
    <bean  class="org.neo4j.kernel.impl.transaction.UserTransactionImpl">
       <constructor-arg value="#{graphDatabaseService.txManager}" />
    </bean>

  3. #3

    Default

    No worries,
    I solved it like this:

    Code:
    <bean id="springTransactionManager" class="org.neo4j.kernel.impl.transaction.SpringTransactionManager">
    	<constructor-arg ref="graphDatabaseService"/>
    </bean>
    <bean id="userTransaction" class="org.neo4j.kernel.impl.transaction.UserTransactionImpl">
    	<constructor-arg ref="springTransactionManager"/>
    </bean>
    <bean id="neo4jTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
    	<property name="transactionManager" ref="springTransactionManager"/>
    	<property name="userTransaction" ref="userTransaction"/>
    </bean>
    Thanks.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •