Hi, Please refer the following url: http://www.tutorialspoint.com/neo4j/neo4j_spring_data_example.htm
Here try to specify different path for different servers preferably make different xml for different servers, and call it according to your requirement. Hope this will help !! -Sukaant Chaudhary <http://in.linkedin.com/pub/sukaant-chaudhary/33/ba8/479> On Tue, Mar 3, 2015 at 3:40 PM, Gwendal Mousset <[email protected]> wrote: > Hello, > > I've the same problem, thanks for your solution but you suggest to use > JDBC. > Is there any solution with SDN ? > > Thanks > > On Monday, March 2, 2015 at 7:26:36 PM UTC+1, Sukaant Chaudhary wrote: >> >> Yes, it is possible to access multiple servers on multiple query for that >> you need to create multiple connections, for each server. >> Please refer the following example for your reference: >> >> // Connect >> Connection conServer1 = >> DriverManager.getConnection("jdbc:neo4j://localhost:7474/"); >> Connection conServer2 = >> DriverManager.getConnection("jdbc:neo4j://localhost:7575/"); >> // Querying >> try{ >> Statement stmtServer1 = conServer1.createStatement() >> ResultSet rsServer1 = stmtServer1.executeQuery("MATCH (n:User) RETURN >> n.name"); >> Statement stmtServer2 = conServer2.createStatement() >> ResultSet rsServer2 = stmtServer2.executeQuery("MATCH (n:User) RETURN >> n.name"); >> while(rsServer1.next()) >> { >> System.out.println(rsServer1.getString("n.name")); >> } >> while(rsServer2.next()) >> { >> System.out.println(rsServer2.getString("n.name")); >> } >> >> } >> >> >> -Sukaant Chaudhary >> <http://in.linkedin.com/pub/sukaant-chaudhary/33/ba8/479> >> >> On Mon, Mar 2, 2015 at 7:31 PM, vincent fraboulet <[email protected]> >> wrote: >> >>> Hello, >>> >>> I have a Spring Project with SDN 3.2.1. >>> >>> Actually, the projet is connected to only one database, on an external >>> server. >>> >>> Is it possible to use 2 differents databases on 2 differents servers, >>> and redirect A query on server 1, and B query on server 2 ? >>> >>> I've done somes searches but i don't find anything. >>> >>> >>> Thanks! >>> Regards, >>> >>> -- >>> 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. >>> >> >> -- > 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. > -- 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.
