Subversion Repositories bacoAlunos

Rev

Rev 1310 | Rev 1782 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1310 Rev 1781
Line 31... Line 31...
31
        if(instance == null)
31
        if(instance == null)
32
            instance = new HibernateTransactionBroker();
32
            instance = new HibernateTransactionBroker();
33
        return instance;
33
        return instance;
34
    }
34
    }
35
 
35
 
-
 
36
 
-
 
37
    @1.5.0/docs/api/java/lang/Override.html">Override
-
 
38
    public boolean isTransactionActive() throws StorageException {
-
 
39
        return HibernateUtils.getCurrentSession().getTransaction().isActive();
-
 
40
    }
-
 
41
 
36
    public void beginTransaction() throws StorageException
42
    public void beginTransaction() throws StorageException
37
    {
43
    {
-
 
44
        if(HibernateUtils.getCurrentSession().getTransaction().isActive())
-
 
45
        {
-
 
46
            1.5.0/docs/api/java/lang/System.html">System.out.println(">>>>>>TRANSACTION PROBLEM: AVISO: Já existia uma transação activa e foi iniciada outra neste momento sem fechar a anterior ");
-
 
47
            for (1.5.0/docs/api/java/lang/StackTraceElement.html">StackTraceElement ste : 1.5.0/docs/api/java/lang/Thread.html">Thread.currentThread().getStackTrace()) {
-
 
48
                1.5.0/docs/api/java/lang/System.html">System.out.println("\t" + ste);
-
 
49
            }
-
 
50
        }
38
        HibernateUtils.getCurrentSession().beginTransaction();
51
        HibernateUtils.getCurrentSession().beginTransaction();
39
    }
52
    }
40
 
53
 
41
    public void commitTransaction() throws StorageException
54
    public void commitTransaction() throws StorageException
42
        {
55
        {