I might be missing something really obvious here, but I couldn't find the sources for a few classes from the javax.persistence package.
I'm using EclipseLink as a JPA provider. When I tried Ctrl+left clicking a method of the EntityManager interface, Eclipse said that I should attach the sources since it can't find them. I tried attaching the EclipseLink ones but it complained it cannot find the source for EntityManager there.
What sources do I need to attach in order to view the code in Eclipse? Could somebody provide a link?
I think if you create a JPA project type in Eclipse you will be able to see the JPA source, or perhaps load the JPA module.
Only the source code to EclipseLink is in the eclipselink-src.jar, you can access the source to JPA from the EclipseLink repository,
http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/jpa/plugins/
The source is not that interesting for JPA, as it is a spec, and all interfaces, there is little to no real code.
The actual implementations of the interfaces can be seen by cloning the git repo:
git clone https://github.com/eclipse/javax.persistence.git
cd javax.persistence
== Then find a specific function
grep -ir 'close()' *
src/javax/persistence/EntityManager.java: public void close();
src/javax/persistence/EntityManagerFactory.java: public void close();
src/javax/persistence/spi/PersistenceProviderResolverHolder.java: in.close();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With