So this is the root cause of these issues. What you were getting in the older version of TopLink was 2 separate Persistence Units and the cache was not synched requiring not using a shared cache or repeated refreshes. This separate PU behaviour and the exception with the new TopLink is a bug (
https://glassfish.dev.java.net/issues/show_bug.cgi?id=2643 ).
The solution for your code is to choose either Application Managed EMFs or Container Managed EMFs. I would recommend Container Managed EMFs.
--Gordon
[Message sent by forum member 'gyorke' (gyorke)]
http://forums.java.net/jive/thread.jspa?messageID=208503