Re: [Neo4j] Officially supported mechanism for J2EE

2011-07-22 Thread eialbur
Sorry for the quantity of my questions, and I apologize in advance if any of them are trivial or stupid. ok - so I guess that in my Session Bean I would use the regular old @Resource annotation: @Resource GraphDatabaseService graphDb; Or do I need to declare Neo to jndi and then reference it?

Re: [Neo4j] Officially supported mechanism for J2EE

2011-07-22 Thread Alexander Smirnov
No, that's wrong. To create ( and shut down GraphDatabaseService in your bean, you should: 1) create @Singleton session bean. In its @PostConstruct method, create appropriate GraphDataBase service object, and stop it in @PreDestroy method. You can mark that bean as created on startup, if you wish

Re: [Neo4j] Officially supported mechanism for J2EE

2011-07-21 Thread eialbur
I have two projects. One is full-on J2EE using Glassfish. The other is Servlet based, using Tomcat. At this point I am not using Spring or Guice - the only injection I get is the standard J2EE injection for my beans. -- View this message in context:

Re: [Neo4j] Officially supported mechanism for J2EE

2011-07-21 Thread eialbur
BTW - I am willing to document what I learn in a cookbook if there are enough people with enough patience to hold my hand as I get everything running. (I wouldn't want to clog up the mail list with the hand holding - especially if I summarize it in a cookbook). -- View this message in context:

Re: [Neo4j] Officially supported mechanism for J2EE

2011-07-21 Thread Michael Hunger
We can fork of the discussion to a thread at help.neo4j.org then it stays separate. I would love if you could do that. Btw. I also meant plain J2EE injection not spring or guice. Michael Am 22.07.2011 um 00:34 schrieb eialbur: BTW - I am willing to document what I learn in a cookbook if

Re: [Neo4j] Officially supported mechanism for J2EE

2011-07-20 Thread 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

Re: [Neo4j] Officially supported mechanism for J2EE

2011-07-20 Thread Michael Hunger
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

Re: [Neo4j] Officially supported mechanism for J2EE

2011-07-18 Thread Alexander Smirnov
I use neo4j in Glassfish, with JCA connector ( https://github.com/alexsmirnov/neo4j-connector ), and currently tested it with Jboss7. The connector has been created for my startup project ( www.netoprise.com, sorry for horrible design, ot's only 10% done ), and I plan to convert it to HA connector

Re: [Neo4j] Officially supported mechanism for J2EE

2011-07-17 Thread Michael Hunger
Hi, do you mean a javax.sql.DataSource or an JCA adaptor ? Could you please explain your architecture and usage scenario where this would be necessary. You can use Neo4j in embedded mode inside any J2EE container without issues. If the container comes with its own XA-TM then you can