I am trying to execute a query using EclipseLink following the crappy documentation at http://wiki.eclipse.org/Introduction_to_EclipseLink_Expressions_%28ELUG%29, but every time you need to execute an Expression it uses a variable called "session", but no where does it explain where this "session" variable comes from. I already have a persistence.xml file and I can run a javax.persistence.Query on my database, so I know the connection works, but I can't figure out where "session" comes from. A little help please?
A side question: I have been having a terrible time trying to get EclipseLink to work, even though everyone says how great it is compared to Hibernate. Is EclipseLink worth my time and frustration, or should I just scrap it and try something like Hibernate instead?
Thanks