Hi Matt,

see http://bit.ly/7P6yaf, thats a groovy implementation of such a filter
being part of the Grails Neo4j plugin. Should be a piece of cake to
transform this code to Java. There are no dependencies to Grails, it's
completely based on Spring stuff.

In addition to http://wiki.neo4j.org/content/Spring_And_Neo, you need to
 add to your application context:

<bean id="neoTransactionInViewFilter" class="NeoTransactionInViewFilter">
        <property name="transactionManager" ref="transactionManager"/>
</bean>

And add a DelegatingFilterProxy servlet filter using
neoTransactionInViewFilter to your web.xml.

Regards,
Stefan

Matt Johnston schrieb:
> I am making a spring based web app and I was wondering if there was
> something similar to hibernate's OpenSessionInView for Neo? Since most
> interactions with the neo db require a transaction, I thought it would be
> better to wrap a web request in one transaction. Every time I need to grab a
> relationship or property from a node, I need a transaction. So I either have
> to start a new transaction for each bit of code (get this relationship, get
> this property), or I can try to wrap my whole web request in one
> transaction.
> 
> 
> Matt
> _______________________________________________
> Neo mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user


_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to