little change in code to determine whether an

invalid dbsource has been specified.
This commit is contained in:
hns 2001-08-05 19:19:19 +00:00
parent 31eee7f668
commit 318cc163d1

View file

@ -238,13 +238,16 @@ public class DbMapping implements Updatable {
} else } else
propertiesRel = null; propertiesRel = null;
app.logEvent ("rewiring: "+this); // app.logEvent ("rewiring: "+this);
} }
public Connection getConnection () throws ClassNotFoundException, SQLException { 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 (); return parentMapping.getConnection ();
if (source == null) { if (source == null) {
if (sourceName == null) if (sourceName == null)