Take a look at some of the introductory Hibernate tutorials that you can get to from my signature links.
You'll notice that all of the initial examples use JPA annotations, and all of them run from a J2SE application with a main method, and all of those stand-alone J2SE applications start and end their own transactions. None of the examples run within a J2EE container at all.
So, if you want to use the J2EE containers implementation of the
Java Transaction API, then you need a J2EE container. But Hibernate provides facilities for coordinating XA compliant transactions without the use of a J2EE container whatsoever.
Does that make any sense?
Hibernate and Transcations from a Stand-Alone J2SE Application (not J2EE/JEE5)
Regards,
-Cameron McKenzie