Project

General

Profile

Revision 71cf0ed1

ID71cf0ed1121c36b044e6b6a3a8167861c2c0882f
Parent c960706c
Child ba38e16d

Added by Andreas Kohlbecker about 3 years ago

ref #7105 logging the calls to factory.openSession() as error

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/DaoBase.java
20 20
import java.util.Map;
21 21
import java.util.Set;
22 22

  
23
import org.apache.log4j.Logger;
23 24
import org.hibernate.Criteria;
24 25
import org.hibernate.HibernateException;
25 26
import org.hibernate.Session;
......
30 31

  
31 32
public abstract class DaoBase {
32 33

  
34
    final static Logger logger = Logger.getLogger(DaoBase.class);
35

  
33 36
    @Autowired
34 37
    private SessionFactory factory;
35 38

  
......
44 47
        try {
45 48
            session = factory.getCurrentSession();
46 49
        } catch (HibernateException e) {
50
            logger.error("Opening new session in turn of a HibernateException: " + e.getMessage());
47 51
            session = factory.openSession();
48 52
        }
49 53
        return session;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)