Package ch.fork.AdHocRailway.domain.turnouts

Examples of ch.fork.AdHocRailway.domain.turnouts.TurnoutPersistenceException


                if (em.getTransaction().isActive())
                    em.getTransaction().commit();
            } catch (HibernateException ex) {
                em.getTransaction().rollback();
                em.close();
                throw new TurnoutPersistenceException("Database Error", ex);
            } catch (PersistenceException x) {
                em.getTransaction().rollback();
                em.close();
                throw new TurnoutPersistenceException("Database Error", x);
            }
            em.close();
            em = null;
            emf.close();
            emf = null;
View Full Code Here


        } catch (HibernateException ex) {
            em.getTransaction().rollback();
            em.close();
            HibernatePersistence.connect();
            HibernatePersistence.getEntityManager().getTransaction().begin();
            throw new TurnoutPersistenceException("Database Error", ex);
        } catch (PersistenceException x) {
            em.getTransaction().rollback();
            em.close();
            HibernatePersistence.connect();
            HibernatePersistence.getEntityManager().getTransaction().begin();
            throw new TurnoutPersistenceException("Database Error", x);
        }
        em.getTransaction().begin();
    }
View Full Code Here

TOP

Related Classes of ch.fork.AdHocRailway.domain.turnouts.TurnoutPersistenceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.