Modificações no sistema de conexão com BD para evitar erro de shared chache e ajuste...
[simdecs2.git] / src / java / org / ufcspa / simdecs / mediador / LogExecucao.java
index 21400ce..d0b5c8b 100644 (file)
@@ -66,7 +66,7 @@ public class LogExecucao {
     private EntityManager em;
     
     
-    public final void refresh(SessaoUsuario sessaoUsuario, Paciente paciente) throws Exception {
+    public final void refresh(SessaoUsuario sessaoUsuario, Paciente paciente, EntityManager em) throws Exception {
         
         // Inicializa Valores
         perguntasRealizadas = perguntasDisponiveis = perguntasProfessor = perguntasBogusRealizadas =
@@ -88,7 +88,7 @@ public class LogExecucao {
         
         nodosInvestigacao = new ArrayList<Nodo>();
         
-        em = DbUtil.getInstance().getEntityManager();
+        //em = DbUtil.getInstance().getEntityManager();
         
         Iterator<Log> itLog = em.createQuery("From Log where sessaoUsuario.id=:pIDSessao order by  data")
                                 .setParameter("pIDSessao", sessaoUsuario.getId())
@@ -244,8 +244,8 @@ public class LogExecucao {
         }        
     }
     
-    public LogExecucao(SessaoUsuario sessaoUsuario, Paciente paciente) throws Exception {
-        refresh(sessaoUsuario, paciente);
+    public LogExecucao(SessaoUsuario sessaoUsuario, Paciente paciente, EntityManager em) throws Exception {
+        refresh(sessaoUsuario, paciente, em);
     }
 
     public boolean isAbriuFichaPaciente() {