Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-10-2018 02:08 PM
Hi All,
I am trying to use session from Spring Data Neo4j framework. I have the following session initiation method right now, but it is only a work around.
Configuration configuration = new Configuration.Builder()
.uri("bolt://localhost")
.credentials("neo4j", "neo4j")
.build();
SessionFactory sessionFactory = new SessionFactory(configuration, "com.pkg.domain");
session = sessionFactory.openSession();
Now, I want to find a way to retrieve the existing session created by the Spring Boot Application with Neo4j using the config from my application properties. Creating a new session for a request everytime is not the best solution for me, so please suggest if you know a way to retrieve the existing session object. I tried to use the Neo4jSessionFactory class, but it doesn't work for my OGM version. I am using OGM 3.1.1
12-11-2018 01:36 PM
Hi,
what are you trying to do with the session? When working with with spring-data-neo4j, you hardly need the underlying session.
Perhaps folks here can suggest better ways to archive what you try to do.
All the sessions of the conference are now available online