Hi Felipe, I would be interested to know more about your use-case: - is the domain same for all customers or is it different domains? (1 domain x N customers vs N domains x N customers vs N domains x M customers) - do you access single instance only or multiple instances? (within single request/business transaction..) - how many customers are there? (single digits? tenths? hundredths?)
Regarding "proper way" (for 1 domain x N customers): This is not possible with 2.1.x/4.2.x release of ogm/sdn. There is too much global state in the library, any such solution would be a massive hack. Running multiple instances of the application (instance per customer) might be best solution. The situation is slightly better in upcoming 3.x release of OGM (and SDN 5) - most of the global state was removed. If you use pure OGM you should be able to just create SessionFactory per customer and lookup that in appropriate place. If you have any issues with this please report them https://github.com/neo4j/neo4j-ogm/issues In SDN you would need to declare SessionFactory and Transaction manager in custom Spring scope that would be "per customer". We haven't implemented this, please feel free to submit a feature request or if you would like to contribute please get in touch. Frantisek On Thursday, July 27, 2017 at 8:45:00 PM UTC+2, Felipe Nascimento wrote: > > Hi! > > On our software we want to have one Neo4J instance per customer, but for > that to work we need to be able to have more than one Session Factory and > Transaction Manager on the same application. > > There's a proper way of achieving that scenario? > > Thank you all in advance, > > Felipe Nascimento > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
