Update:
If I use the following code and just load one persistence unit out of the two. It seems to work properly:
EntityManagerFactory emf = Persistence.createEntityManagerFactory("pu-name1");
EntityManager em = emf.createEntityManager();
Query DataQuery = em.createNamedQuery("Vc114Data.findByVc114ID");
DataQuery.setParameter("vc1ID", Id);
List<Vc114Data> DataList = DataQuery.getResultList();
int countAgentData = DataList.size();
System.out.println("Data length: " + countData);
and the syso there gives me the output "Data length: 1
maybe that helps!
[Message sent by forum member 'peter0601']
http://forums.java.net/jive/thread.jspa?messageID=397323