Hello Kiril,
I'm afraid i'm not using a connection pooling, just an static way to load
the drivers
public class PgSQLDBConn {
static {
try {
Class.forName("org.postgresql.Driver");
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
public Connection getConnection() {
Connection connection = null;
try {
connection =
DriverManager.getConnection("jdbc:postgresql://localhost:5432/db_gpstracker","MYUSER","MYPWD");
} catch (Exception e) {
System.out.println(e.getMessage());
}
return connection;
}
}
I call the method getConnection each time i want to connect to the database,
execute the statements and then i close the connection (repeat each time i
receive some data from the GPS device)
Best regards
Fernando
On Wed, Nov 11, 2009 at 3:10 PM, Kirill Zinov <[email protected]>wrote:
> Hello Fernando,
>
> I think this is java application design problem. I don't use PostGIS with
> Java but Postgres works perfectly for me.
>
> Do you use connection pooling?
>
> Kirill,
>
>
> Fernando Tong wrote:
>
>> Thanks for your repplies.
>>
>> Yes, Rob, i'm connecting and disconnecting every time. Here some part of
>> the logs, sorry if it's a noob question but why when the connection is
>> received the port number is increasing? it starts in 3668 and the next
>> connection is 3669 and so on
>>
>>
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users