8,6 → 8,9 |
import java.util.Date; |
import java.util.List; |
|
|
//TODO PRECISA DE CHAMAR UM SERVICO EM VEZ DE SER ASSIM porque esta a abrir transacoes por todo lado |
//PRECISA DE SE FAZER UM CHECK A TODO O CODIGO QUE ABRE TRANSACOES FORA DOS SERVICOS |
/** |
* @author Jorge Machado |
* @date 28/Fev/2008 |
192,9 → 195,12 |
|
public int getNationalInstitutionCodeCreateTransaction() |
{ |
getCurrentSession().beginTransaction(); |
boolean alreadyActive = getCurrentSession().getTransaction().isActive(); |
if(!alreadyActive) |
getCurrentSession().beginTransaction(); |
int code = getNationalInstitutionCode(); |
getCurrentSession().getTransaction().commit(); |
if(!alreadyActive) |
getCurrentSession().getTransaction().commit(); |
return code; |
} |
|