8.1-407 JDBC driver issues
8.1-407 JDBC driver issues
От:
"lasitha weerasinghe" <lasitha_w@hotmail.com>
Дата:
Hi,
I'm using postgresql 8.1-407 jdbc driver with postgresql 7.4.13 database and
it seems like there is an issue when the driver is used in jdbc
transactions. I'm using this version of the jdbc driver, cause I haven't
came across any fixes for the 8.1.4 security issuse for the 7.4.13 database
driver. I only noticed that the fix has been done for the v.8 drivers only.
But the problem i'm facing now is when i'm using statements in a transaction
(setting the connection.setAutoCommit(false)) some of the records doesn't go
to the database. This is not a frequent issue and also I have noticed couple
of times that if I try to add the same record again the db will throw
duplicate record exception even though the record is not there in the
database.
this is the code i'm using for JDBC transactions.
connection.setAutoCommit( false );
connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
try { // ... execute statements connection.commit();
} catch (Exception e) { logger.logError(e); connection.rollback();
}
is anyone of you came across this problem and managed to find a solution?
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Re: 8.1-407 JDBC driver issues
От:
Dave Cramer <pg@fastcrypt.com>
Дата:
This belongs on the jdbc driver list....
On 27-Oct-06, at 6:29 AM, lasitha weerasinghe wrote:
> Hi,
>
> I'm using postgresql 8.1-407 jdbc driver with postgresql 7.4.13
> database and it seems like there is an issue when the driver is
> used in jdbc transactions. I'm using this version of the jdbc
> driver, cause I haven't came across any fixes for the 8.1.4
> security issuse for the 7.4.13 database driver. I only noticed that
> the fix has been done for the v.8 drivers only.
>
> But the problem i'm facing now is when i'm using statements in a
> transaction (setting the connection.setAutoCommit(false)) some of
> the records doesn't go to the database. This is not a frequent
> issue and also I have noticed couple of times that if I try to add
> the same record again the db will throw duplicate record exception
> even though the record is not there in the database.
>
> this is the code i'm using for JDBC transactions.
>
> connection.setAutoCommit( false );
> connection.setTransactionIsolation
> (Connection.TRANSACTION_SERIALIZABLE);
> try {
> // ... execute statements
> connection.commit();
> } catch (Exception e) {
> logger.logError(e);
> connection.rollback();
> }
>
> is anyone of you came across this problem and managed to find a
> solution?
The 8.1 driver should work fine on a 7.4 server, now I still don't
know the problem ? I've never seen it not put the record in the
database ? Have you looked at the server logs ?
I need more information to fix this .
Dave
>
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar - get it now! http://
> toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>