I am using OpenJPA 2.1 (which implements JPA 2.0) for a command line utility. I am using classes that are new for JPA 2.0.
My compile target is Java SE 1.6
OpenJPA 2.1 comes with all JPA 2.0 javax.persistence.*
interfaces/implementations.
Can I claim that my utility has no dependence on JavaEE 6?
My understanding is that JavaEE 6 is a collection of standards. So it is no different in that respect from any other random set of standards. Hence JavaEE 6 depends on JPA 2.0, but JPA 2.0 does not depend on JavaEE 6, correct?
JPA 2.0 is a an independent standard, you can use it in a standalone Java application without application server. In fact many people are using JPA in spring - which does not require any container to run.
I always smile a bit at questions like this -- good question, the potential answers make me smile.
JPA in Java SE
If the question is really, "can I use JPA in Java SE?" The answer is clearly, yes. There's a bootstrapping API for Java SE. It's actually a subset of JPA and doesn't contain container-managed (JTA) EntityManagers, but it works fine and is fantastic.
For some people, this is "not JavaEE". Fair enough.
EJB in Java SE
If we ask the same question about EJB, "can I use EJB in Java SE?" The answer is also, yes. There's an identical bootstrapping API for Java SE. It's modeled after the JPA API, is also a subset and equally light depending on the implementation you pick.
Far fewer people will consider this "not JavaEE". That's also fair as long as you answered that JPA is JavaEE.
So, Java EE or Not?
I suspect everyone on some level, including myself, felt the need to answer "no" and "yes" respectively. It's tempting to start with the gut instinct and work backwards to rationalize it, but ultimately it doesn't change reality.
At what point do you consider a partially full glass to be either "empty" or "full"? It's a trick question as a glass that is partially full is neither empty nor full. If you want to consider it one or the other, that is a personal distinction. It doesn't change reality.
JPA is a JavaEE spec (created by the EJB group), so using it definitely means you have involved some Java EE. Is it all of JavaEE, no. It isn't none of Java EE either.
About the most honest phrasing you could use, is "I am using a Java EE feature in a Java SE environment."
Ultimately, it doesn't matter. Use what you like.
Your glass is partially full with some open source Java EE goodness. Excellent. As long as there are good people in open source willing to fill your glass for free,... I say drink up!