hy all, we suppose we have many entity A, B, C ,D when i call ejb bean for save new entity or update entity, i would like found a mode for verify if not another managed Bean thread has save a new entity A or B or C or D or has update one or mode for verify if a table is modified when i m in transaction because when i like save new Entity A has a many field integer depend for haw match specific entity B and c and d is saved in DB
@Stateless
public class EntityABean implements EntityARemote, EntityALocal {
@Resource
private SessionContext context;
@EJB
private DaoEntity daoEntityEjb;
public void doSomthing(Object param1, Object param2 ...) {
try {
//dosomthing
}
catch(Excepyion ex) {
context.rollback();
throw ex;
}
}