Project

General

Profile

« Previous | Next » 

Revision c7ef3e53

Added by Andreas Müller over 1 year ago

ref #10090 catch LIE in Team.getCollectorTitleCache

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/agent/Team.java
29 29

  
30 30
import org.apache.logging.log4j.LogManager;
31 31
import org.apache.logging.log4j.Logger;
32
import org.hibernate.LazyInitializationException;
32 33
import org.hibernate.annotations.Cascade;
33 34
import org.hibernate.annotations.CascadeType;
34 35
import org.hibernate.annotations.ListIndexBase;
......
356 357
        if (collectorTitleCache == null){
357 358
            this.collectorTitleCache = cacheStrategy().getCollectorTitleCache(this);
358 359
        }else{
359
            //as long as team members do not inform the team about changes the cache must be created new each time
360
            collectorTitleCache = cacheStrategy().getCollectorTitleCache(this);
360
            try {
361
                //as long as team members do not inform the team about changes the cache must be created new each time
362
                collectorTitleCache = cacheStrategy().getCollectorTitleCache(this);
363
            } catch (LazyInitializationException e) {
364
                //for debugging #10090 only
365
                logger.error("LIE during getCollectorTitleCache");
366
                e.printStackTrace();
367
                throw e;
368
            }
361 369
        }
362 370
        return collectorTitleCache;
363 371
    }

Also available in: Unified diff