Package at.ipsquare.commons.core.interfaces

Examples of at.ipsquare.commons.core.interfaces.ExecutionError


                return work.execute();
            }
            catch(Exception e)
            {
                log.warn(exceptionLogMessage(work), e);
                throw new ExecutionError(e);
            }
        }
       
        log.info("Executing " + work + ".");
        Session session = session();
        currentSession.set(session);
        currentUnitOfWork.set(work);
       
        session.beginTransaction();
        try
        {
            T result = null;
            try
            {
                result = work.execute();
            }
            catch(Exception e)
            {
                log.warn(exceptionLogMessage(work), e);
               
                Transaction tx = getActiveTransaction(session);
                if(tx != null)
                    tx.rollback();
                throw new ExecutionError(e);
            }
           
            Transaction tx = getActiveTransaction(session);
            if(tx != null)
                tx.commit();
View Full Code Here


                ok = true;
                return null;
            }
            catch(Exception e)
            {
                throw new ExecutionError(e);
            }
            finally
            {
                (ok ? unitsProcessedOk : unitsProcessedError).incrementAndGet();
            }
View Full Code Here

                return work.execute();
            }
            catch(Exception e)
            {
                log.warn(exceptionLogMessage(work), e);
                throw new ExecutionError(e);
            }
        }
       
        log.info("Executing " + work + ".");
        Session session = session();
        currentSession.set(session);
        currentUnitOfWork.set(work);
       
        session.beginTransaction();
        try
        {
            T result = null;
            try
            {
                result = work.execute();
            }
            catch(Exception e)
            {
                log.warn(exceptionLogMessage(work), e);
               
                Transaction tx = getActiveTransaction(session);
                if(tx != null)
                    tx.rollback();
                throw new ExecutionError(e);
            }
           
            Transaction tx = getActiveTransaction(session);
            if(tx != null)
                tx.commit();
View Full Code Here

                ok = true;
                return null;
            }
            catch(Exception e)
            {
                throw new ExecutionError(e);
            }
            finally
            {
                (ok ? unitsProcessedOk : unitsProcessedError).incrementAndGet();
            }
View Full Code Here

TOP

Related Classes of at.ipsquare.commons.core.interfaces.ExecutionError

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.