Hi, excuse my (maybe) silly question, I'm relatively new to EJBs.
When I use code like this (example from the EJB3.0 specification):
@PersistenceUnit(
name=?persistence/InventoryAppDB?,
unitName=?InventoryManagement?
)
@Stateless
public class InventoryManagerBean implements InventoryManager {
@Resource SessionContext ctx;
public void updateInventory(...) {
...
javax.persistence.EntityManagerFactory emf =
(javax.persistence.EntityManagerFactory)
ctx.lookup("persistence/InventoryAppDB");
javax.persistence.EntityManager em = emf.getEntityManager();
...
}
}
it doesn't work by now and I heard it's a bug and should be corrected in
another version of JBoss AS..
WHAT I'd like to know is whether I could register the
"persistence/InventoryAppDB? on one SessionBean class and call the
ctx.lookup("persistence/InventoryAppDB");
in another bean of different SessionBean class.. Will the environment still be
visible?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932771#3932771
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932771
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user