Hi,
I have Interface which is defined as
@Local
public interface MyPersistenceManagerLocal {
public List getPropertyList(int id);
}
and implentaion class for above interface is
@Stateless
public class MyPersistenceManagerBean implements MyPersistenceManagerLocal {
@PersistenceContext(unitName = PersistentSettings.PERSIST_NAME)
private EntityManager entityManager;
@Override
public List getPropertyList(int id) {
System.out.println("inside MyPersistenceManagerBean.getPropertyList()");
......
......
......
}
}
and i am calling this in another class
@Stateless
public class ClientImpl implements Client {
@EJB
MyPersistenceManagerLocal persistenceManager;
final List dbList = persistenceManager.getPropertyList(id);
}
i am getting NullPointerException on
final List dbList = persistenceManager.getPropertyList(id);
in debug mode i got persistenceManager is null.
i am new in EJB and JPA not able to solve this. any help why i am getting persistenceManager as null