Package org.b3log.latke.repository

Examples of org.b3log.latke.repository.Transaction.rollback()


            } else {
                Latkes.disablePageCache();
            }
        } catch (final JSONException e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
            LOGGER.log(Level.SEVERE, "Updates preference failed", e);
            throw new ServiceException(langPropsService.get("updateFailLabel"));
        } catch (final RepositoryException e) {
            if (transaction.isActive()) {
View Full Code Here


            }
            LOGGER.log(Level.SEVERE, "Updates preference failed", e);
            throw new ServiceException(langPropsService.get("updateFailLabel"));
        } catch (final RepositoryException e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
            LOGGER.log(Level.SEVERE, "Updates preference failed", e);
            throw new ServiceException(langPropsService.get("updateFailLabel"));
        } catch (final IOException e) {
            if (transaction.isActive()) {
View Full Code Here

            }
            LOGGER.log(Level.SEVERE, "Updates preference failed", e);
            throw new ServiceException(langPropsService.get("updateFailLabel"));
        } catch (final IOException e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
            LOGGER.log(Level.SEVERE, "Updates preference failed", e);
            throw new ServiceException(langPropsService.get("updateFailLabel"));
        }
View Full Code Here

        try {
            preferenceRepository.update(Preference.REPLY_NOTIFICATION_TEMPLATE, replyNotificationTemplate);
            transaction.commit();
        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }

            LOGGER.log(Level.ERROR, "Updates reply notification failed", e);
            throw new ServiceException(e);
        }
View Full Code Here

            final ServletContext servletContext = SoloServletListener.getServletContext();

            Templates.MAIN_CFG.setServletContextForTemplateLoading(servletContext, "/skins/" + skinDirName);
        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }

            LOGGER.log(Level.ERROR, "Updates preference failed", e);
            throw new ServiceException(langPropsService.get("updateFailLabel"));
        }
View Full Code Here

        try {
            articleMgmtService.addArticleInternal(article);
            transaction.commit();
        } catch (final ServiceException e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }

            throw e;
        }
    }
View Full Code Here

                // Allow retry to occur
                --retries;
                LOGGER.log(Level.WARNING, "Retrying to init B3log Solo[retries={0}]", retries);
            } finally {
                if (transaction.isActive()) {
                    transaction.rollback();
                }
            }
        }
       
        final Transaction transaction = userRepository.beginTransaction();
View Full Code Here

        try {
            helloWorld();
            transaction.commit();
        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
           
            LOGGER.log(Level.SEVERE, "Hello World error?!", e);
        }
    }
View Full Code Here

                // Allow retry to occur
                --retries;
                LOGGER.log(Level.WARN, "Retrying to init B3log Solo[retries={0}]", retries);
            } finally {
                if (transaction.isActive()) {
                    transaction.rollback();
                }
            }
        }

        final Transaction transaction = userRepository.beginTransaction();
View Full Code Here

        try {
            helloWorld();
            transaction.commit();
        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }

            LOGGER.log(Level.ERROR, "Hello World error?!", e);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.