# HG changeset patch # User Ingo Weinzierl # Date 1299160435 0 # Node ID e4a1562dfc21c97e9900d0a36e4c9af8fc6c71b3 # Parent dc687827439f6d278cda0cc38c755be24b80aeed Bugfixed the collection creation in the Backend. artifacts/trunk@1386 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r dc687827439f -r e4a1562dfc21 ChangeLog --- 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 + + * 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 * artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java: diff -r dc687827439f -r e4a1562dfc21 artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.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);