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
This commit is contained in:
Pinaki Poddar 2007-08-03 21:17:24 +00:00
parent 4150e7f566
commit 3c17af7351
1 changed files with 9 additions and 3 deletions

View File

@ -164,7 +164,8 @@ public class ProductDerivations {
/** /**
* Apply {@link ProductDerivation#beforeConfigurationConstruct} callbacks * 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) { public static void beforeConfigurationConstruct(ConfigurationProvider cp) {
for (int i = 0; i < _derivations.length; i++) { for (int i = 0; i < _derivations.length; i++) {
@ -182,7 +183,8 @@ public class ProductDerivations {
/** /**
* Apply {@link ProductDerivation#beforeConfigurationLoad} callbacks * 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) { public static void beforeConfigurationLoad(Configuration conf) {
for (int i = 0; i < _derivations.length; i++) { for (int i = 0; i < _derivations.length; i++) {
@ -200,12 +202,16 @@ public class ProductDerivations {
/** /**
* Apply {@link ProductDerivation#afterSpecificationSet} callbacks * 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) { public static void afterSpecificationSet(Configuration conf) {
for (int i = 0; i < _derivations.length; i++) { for (int i = 0; i < _derivations.length; i++) {
try { try {
_derivations[i].afterSpecificationSet(conf); _derivations[i].afterSpecificationSet(conf);
} catch (BootstrapException be) {
if (be.isFatal())
throw be;
} catch (Exception e) { } catch (Exception e) {
// logging not configured yet // logging not configured yet
e.printStackTrace(); e.printStackTrace();