[postgis-users] Postgis concurrence question
Fernando Tong
nandorov at gmail.com
Wed Nov 11 12:28:26 PST 2009
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 <kirill.zinov at gmail.com>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
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091111/c364ccd7/attachment.html>
More information about the postgis-users
mailing list