Author: eric Date: Tue Jun 14 15:05:04 2011 New Revision: 1135632 URL: http://svn.apache.org/viewvc?rev=1135632&view=rev Log: Log PersistenceException with slf4j error method in jpa-domain (JAMES-1268)
Modified: james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java Modified: james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java URL: http://svn.apache.org/viewvc/james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java?rev=1135632&r1=1135631&r2=1135632&view=diff ============================================================================== --- james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java (original) +++ james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java Tue Jun 14 15:05:04 2011 @@ -78,11 +78,10 @@ public class JPADomainList extends Abstr domains = entityManager.createNamedQuery("listDomainNames").getResultList(); transaction.commit(); } catch (PersistenceException e) { - getLogger().debug("Failed to list domains", e); + getLogger().error("Failed to list domains", e); if (transaction.isActive()) { transaction.rollback(); } - throw new DomainListException("Unable to retrieve domains", e); } finally { entityManager.close(); @@ -110,7 +109,7 @@ public class JPADomainList extends Abstr transaction.commit(); return false; } catch (PersistenceException e) { - getLogger().debug("Failed to find domain", e); + getLogger().error("Failed to find domain", e); if (transaction.isActive()) { transaction.rollback(); } @@ -135,7 +134,7 @@ public class JPADomainList extends Abstr entityManager.persist(jpaDomain); transaction.commit(); } catch (PersistenceException e) { - getLogger().debug("Failed to save domain", e); + getLogger().error("Failed to save domain", e); if (transaction.isActive()) { transaction.rollback(); } @@ -159,7 +158,7 @@ public class JPADomainList extends Abstr entityManager.createNamedQuery("deleteDomainByName").setParameter("name", domain).executeUpdate(); transaction.commit(); } catch (PersistenceException e) { - getLogger().debug("Failed to remove domain", e); + getLogger().error("Failed to remove domain", e); if (transaction.isActive()) { transaction.rollback(); } --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org