Session2Beanpublic class Session2Bean extends Object implements Session2
Fields Summary |
---|
EntityManager | manager1 | EntityManager | manager2 | EntityManagerFactory | factory1 | EntityManagerFactory | factory2 |
Methods Summary |
---|
public Entity1 | find1FromFactory(int id)
EntityManager m = factory1.createEntityManager();
Entity1 one = m.find(Entity1.class, id);
return one;
| public Entity1 | find1FromManager(int id)
return manager1.find(Entity1.class, id);
| public Entity2 | find2FromFactory(int id)
EntityManager m = factory2.createEntityManager();
Entity2 two = m.find(Entity2.class, id);
return two;
| public Entity2 | find2FromManager(int id)
return manager2.find(Entity2.class, id);
|
|