From 3c17af735143df69f6bfbc49c028f5b152405c31 Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Fri, 3 Aug 2007 21:17:24 +0000 Subject: [PATCH] Fatal Bootstarp exception raised by any ProductDerivation will abandon bootstrapping process git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@562584 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/openjpa/lib/conf/ProductDerivations.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java index 50951457a..13869b506 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java @@ -164,7 +164,8 @@ public class ProductDerivations { /** * Apply {@link ProductDerivation#beforeConfigurationConstruct} callbacks - * to the the given instance. Exceptions are swallowed. + * to the the given instance. Exceptions other than fatal + * {@link BootstrapException} are swallowed. */ public static void beforeConfigurationConstruct(ConfigurationProvider cp) { for (int i = 0; i < _derivations.length; i++) { @@ -182,7 +183,8 @@ public class ProductDerivations { /** * Apply {@link ProductDerivation#beforeConfigurationLoad} callbacks - * to the the given instance. Exceptions are swallowed. + * to the the given instance. Exceptions other than fatal + * {@link BootstrapException} are swallowed. */ public static void beforeConfigurationLoad(Configuration conf) { for (int i = 0; i < _derivations.length; i++) { @@ -200,12 +202,16 @@ public class ProductDerivations { /** * Apply {@link ProductDerivation#afterSpecificationSet} callbacks - * to the the given instance. Exceptions are swallowed. + * to the the given instance. Exceptions other than fatal + * {@link BootstrapException} are swallowed. */ public static void afterSpecificationSet(Configuration conf) { for (int i = 0; i < _derivations.length; i++) { try { _derivations[i].afterSpecificationSet(conf); + } catch (BootstrapException be) { + if (be.isFatal()) + throw be; } catch (Exception e) { // logging not configured yet e.printStackTrace();