Announcement Announcement Module
Collapse
No announcement yet.
spring data neo4j - how do I use more than one neo4j database service in my app? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring data neo4j - how do I use more than one neo4j database service in my app?

    In my spring data neo4j application I have 2 neo4j databases. How do I relate a repository of a specific database services?

    for example I have..

    MyRepository1 extends GraphRepository
    MyRepository2 extends GraphRepository

    I want MyRepository1 to be associated with a neo4j database at http://someserver:7474
    I want MyRepository2 to be associated with a neo4j database at http://someotherserver:7474

    Is this possible? If so, exactly how?

    Regards
    Ron

  • #2
    You'll want this thread posted down one level in the forums to the subforum called NoSQL for getting more responses from the Neo4J people. It is right at the top of this forum the link to the subforums.

    One possible solution for your problem, which we had to do, not because of two neo4J databases but because of using Neo4J and RDBMS JPA. The entity scanning was overlapping.

    So what we did was separate the domain classes and repositories in different packages so when you do a config.

    <neo4j.repositories base-package="com.me.repos.neo4j/>

    and

    <jpa:repositories base-package="com.me.repos.jpa/>

    You could do the same with say com.me.repos.someserver and com.me.repos.someotherserver.

    It is a sort of hack,but works

    Mark

    Comment

    Working...
    X