Mercurial > dive4elements > framework
changeset 161:e4a1562dfc21
Bugfixed the collection creation in the Backend.
artifacts/trunk@1386 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 03 Mar 2011 13:53:55 +0000 |
parents | dc687827439f |
children | 4ac91485b4e0 |
files | ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java |
diffstat | 2 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Mar 03 12:17:27 2011 +0000 +++ b/ChangeLog Thu Mar 03 13:53:55 2011 +0000 @@ -1,3 +1,10 @@ +2011-03-03 Ingo Weinzierl <ingo@intevation.de> + + * artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java: + Bugfixes while collection creation: Create a Connection object before + setting its attributes and corrected the order of the values inserted + into the SQL statement. + 2011-03-03 Ingo Weinzierl <ingo@intevation.de> * artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java:
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Thu Mar 03 12:17:27 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Thu Mar 03 13:53:55 2011 +0000 @@ -1119,10 +1119,9 @@ DataSource dataSource = DBConnection.getDataSource(); try { + conn = dataSource.getConnection(); conn.setAutoCommit(false); try { - conn = dataSource.getConnection(); - // fetch owner id stmnt = conn.prepareStatement(SQL_USERS_SELECT_ID_BY_GID); stmnt.setString(1, ownerIdentifier); @@ -1154,8 +1153,8 @@ stmnt.setInt(1, id); stmnt.setString(2, identifier); - stmnt.setInt(3, ownerId); - stmnt.setString(4, name); + stmnt.setString(3, name); + stmnt.setInt(4, ownerId); // XXX: A bit odd: we don't have a collection, yet. Long ttl = factory.timeToLiveUntouched(null, context);