From 318cc163d1274fe972771ae6ca1b1a42c51ba5f4 Mon Sep 17 00:00:00 2001 From: hns Date: Sun, 5 Aug 2001 19:19:19 +0000 Subject: [PATCH] little change in code to determine whether an invalid dbsource has been specified. --- src/helma/objectmodel/DbMapping.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/helma/objectmodel/DbMapping.java b/src/helma/objectmodel/DbMapping.java index 00d55325..3494c329 100644 --- a/src/helma/objectmodel/DbMapping.java +++ b/src/helma/objectmodel/DbMapping.java @@ -238,13 +238,16 @@ public class DbMapping implements Updatable { } else propertiesRel = null; - app.logEvent ("rewiring: "+this); + // app.logEvent ("rewiring: "+this); } public Connection getConnection () throws ClassNotFoundException, SQLException { - if (source == null && parentMapping != null) + // if source was previously not available, check again + if (source == null && sourceName != null) + source = app.getDbSource (sourceName); + if (sourceName == null && parentMapping != null) return parentMapping.getConnection (); if (source == null) { if (sourceName == null)