Register / Login
Object Relational Mapping
JNDI Lookup code for EntityMananger inside SessionBean
Ravi Kiran Va
posted 7 years ago
I am using JNDI look up inside my stateless session Bean for Thread Safety issues .
@PersistenceContext(Unitname="someunit" name= "somename")
Context ctx = new
EntityManager em = (EntityManager)ctx.lookup("somename")
Now i am having 4 methods for (CRUD) inside my sessionBean
Do i need to use this lookup code inside my every method that is in all my 4 methods
Please tell me this if i am having four methods inside my Session Bean do i need to do lookup inside each of my method.
Save India From Corruption - Anna Hazare.
JNDI for local and remote interfaces: which works?
Web Services for EJB Session Beans
EJBs in helper classes - can't figure out how to do it
Urgent::Not able to rollback UserTransaction
EJB3 - Passing intialization parameters in the absence of Home interface