-
Bug
-
Resolution: Done
-
Major
-
7.1.1.Final
-
None
See example here of using @PersistenceContexts.
@Stateless @PersistenceContexts({ @PersistenceContext(name="OrderEM"), @PersistenceContext(name="ItemEM") }) public class OrderEntryBean implements OrderEntry { @Resource EJBContext ctx; public Customer getCustomer(int custID) { EntityManager em = (EntityManager)ctx.lookup("OrderEM"); return em.find(Customer.class, custID); } public void enterItem(int orderID, Item newItem) { EntityManager em = (EntityManager)ctx.lookup("ItemEM"); ... } }