I'd like to access the persistence layer through JPA/Eclipselink and JDBC Connections in the same application.
The problem is, that changes which have been made directly using the JDBC Connections aren't reflected to the JPA EntityManagers, even though I open the newly created EntityManager afterwards.
I'm using Tomcats JDBC-Connection pool for both, the JDBC Connections and the JPA EntityManagers.
Is there a way to handle such "conflicts"? I've found this: Disable caching in JPA (eclipselink).
I've also found this: http://wiki.eclipse.org/EclipseLink/Examples/JPA/EMAPI#Getting_a_JDBC_Connection_from_an_EntityManager but I don't like the idea, because the code which uses JDBC-Connections is in a seperate library which shouldn't use JPA at all.
Is there a state of the art solution for working likewise with JDBC-Connections and JPA/Eclipselink-Connections?