To answer a few of your questions: Neo4j is a database, GraphDatabaseService encapsulates your "connection" to that database. You don't mind using other databases from J2EE. If you run clustered just use Neo4j's High Availability mode across the cluster.
As Neo4j has no concept of a connection but a threadsafe Service that represents the database you don't have to start/close a connection per operation. It is best to have the Neo4j GraphDatabaseService getting injected into you session bean. Make sure that the j2ee lifecycle calls the "shutdown" method on shutdown of the j2ee container. What App server are you running ? Neo4j offers the means of integrating with external XA-TX managers - effectively using them instead of its own TX-manager. Good catch with the cookbook. Perhaps we can create one on the wiki and make it a part of the manual when we got enough content. Cheers Michael Am 20.07.2011 um 21:31 schrieb eialbur: > My understanding of the J2EE standard is that you should *not* do file I/O > from inside a bean (my assumption is to avoid issues if you run in a > clustered environment). If I access Neo4j directly from a bean, wouldn't I > be violating that? > > I am not currently clustered, and my app is small enough I may not need to - > so I am considering violating that standard (because neo4j rocks). However, > if you provided JCA or other mechanisms so that we could access Neo4j just > like any other J2EE data source, that would make my life simpler. > > Barring that, I either need to violate the standard, write my own JCA, or > borrow the JCA developed by one of your other users. > > So lets assume I go ahead and access Neo4j from inside my session bean. Do > you have any Neo4j sanctioned write-up on integrating with a session bean > (or even with a servlet), covering where to connect to the db, where to > close the connection, how to integrate with XA transaction, etc? I've seen > a couple of threads on these things, but would be more comfortable if Neo4j > had their own cookbook on the subject. > > Thanks > > -- > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Officially-supported-mechanism-for-J2EE-tp3176938p3186416.html > Sent from the Neo4J Community Discussions mailing list archive at Nabble.com. > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

