pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feeduse connection pooling
7+ messages / 5 participants
[nested] [flat]
* use connection pooling
@ 2006-12-22 06:58 janaka priyadarshana <rpjanaka@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: janaka priyadarshana @ 2006-12-22 06:58 UTC (permalink / raw)
To: pgsql-jdbc
i am tring to use connection pooing with postgresql but i was unable to
found complete example about that.
got some idea from the documentation, but i was unable to run the given
example.
please help me to getting start..
thanks....
Jdbc3PoolingDataSource source = new Jdbc3PoolingDataSource();
source.setDataSourceName("A Data Source");
source.setServerName("localhost");
source.setDatabaseName("test");
source.setUser("testuser");
source.setPassword("testpassword");
source.setMaxConnections(10);
Connection con = null;
try {
con = source.getConnection();
// use connection
} catch (SQLException e) {
// log error
} finally {
if (con != null) {
try { con.close(); } catch (SQLException e) {}
}
}
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: use connection pooling
@ 2007-02-08 09:45 janaka priyadarshana <rpjanaka@gmail.com>
parent: janaka priyadarshana <rpjanaka@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: janaka priyadarshana @ 2007-02-08 09:45 UTC (permalink / raw)
To: pgsql-jdbc
hi all
my database server is running on one machine and the application is running
on another machine(simple java application use to access the database).
so i want to know, what is the protocol that use to communicate between
those two applications...?
thank you..
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: use connection pooling
@ 2007-02-08 17:26 Guy Rouillier <guyr-ml1@burntmail.com>
parent: janaka priyadarshana <rpjanaka@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Guy Rouillier @ 2007-02-08 17:26 UTC (permalink / raw)
To: pgsql-jdbc
janaka priyadarshana wrote:
> hi all
>
>
> my database server is running on one machine and the application is
> running on another machine(simple java application use to access the
> database).
>
> so i want to know, what is the protocol that use to communicate between
> those two applications...?
JDBC.
--
Guy Rouillier
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: use connection pooling
@ 2007-02-08 18:22 John R Pierce <pierce@hogranch.com>
parent: Guy Rouillier <guyr-ml1@burntmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: John R Pierce @ 2007-02-08 18:22 UTC (permalink / raw)
To: pgsql-jdbc
Guy Rouillier wrote:
> janaka priyadarshana wrote:
>> hi all
>>
>>
>> my database server is running on one machine and the application is
>> running on another machine(simple java application use to access the
>> database).
>>
>> so i want to know, what is the protocol that use to communicate
>> between those two applications...?
>
> JDBC.
>
not exactly. JDBC is the API your app uses to access the database.
the JDBC class libraries for postgres on the client system will use
postgres's native protocol to talk to the PG Server (default of 5432/tcp)
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: use connection pooling
@ 2007-02-09 00:51 Guy Rouillier <guyr-ml1@burntmail.com>
parent: John R Pierce <pierce@hogranch.com>
0 siblings, 2 replies; 7+ messages in thread
From: Guy Rouillier @ 2007-02-09 00:51 UTC (permalink / raw)
To: pgsql-jdbc
John R Pierce wrote:
> Guy Rouillier wrote:
>> janaka priyadarshana wrote:
>>> hi all
>>>
>>>
>>> my database server is running on one machine and the application is
>>> running on another machine(simple java application use to access the
>>> database).
>>>
>>> so i want to know, what is the protocol that use to communicate
>>> between those two applications...?
>>
>> JDBC.
>>
>
> not exactly. JDBC is the API your app uses to access the database.
> the JDBC class libraries for postgres on the client system will use
> postgres's native protocol to talk to the PG Server (default of 5432/tcp)
Well, with any network communication, there are multiple layers of
protocols involved. You took it one layer below JDBC, but we could keep
on going down to the physical layer link protocol. Since the O.P. was
asking on a JDBC mailing list, I assumed he was interested in that layer.
--
Guy Rouillier
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: use connection pooling
@ 2007-02-09 12:54 Vit Timchishin <tivv@gtech-ua.com>
parent: Guy Rouillier <guyr-ml1@burntmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: Vit Timchishin @ 2007-02-09 12:54 UTC (permalink / raw)
To: ; +Cc: pgsql-jdbc
Guy Rouillier wrote:
> John R Pierce wrote:
>> Guy Rouillier wrote:
>>> janaka priyadarshana wrote:
>>>> hi all
>>>>
>>>>
>>>> my database server is running on one machine and the application
>>>> is running on another machine(simple java application use to access
>>>> the database).
>>>>
>>>> so i want to know, what is the protocol that use to communicate
>>>> between those two applications...?
>>>
>>> JDBC.
>>>
>>
>> not exactly. JDBC is the API your app uses to access the
>> database. the JDBC class libraries for postgres on the client
>> system will use postgres's native protocol to talk to the PG Server
>> (default of 5432/tcp)
>
> Well, with any network communication, there are multiple layers of
> protocols involved. You took it one layer below JDBC, but we could
> keep on going down to the physical layer link protocol. Since the
> O.P. was asking on a JDBC mailing list, I assumed he was interested in
> that layer.
>
Note the difference between the Protocol and the API.
Correct answer, IMHO, would be that PostgreSQL JDBC driver is Type 4 and
it will use same protocol as native client. To be noted, that is does
not contain Type 2 driver and so can communicate via TCP/IP only, even
when connecting to local host. Also there is an option to use SSL
secured connection, but I can't tell any more (how to enable this)
because've never used this mode. There may be some Java-specific SSL
problems (like specifying keyring).
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: use connection pooling
@ 2007-02-09 14:15 James Neff <jneff@tethyshealth.com>
parent: Guy Rouillier <guyr-ml1@burntmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: James Neff @ 2007-02-09 14:15 UTC (permalink / raw)
To: pgsql-jdbc
Guy Rouillier wrote:
> John R Pierce wrote:
>> Guy Rouillier wrote:
>>> janaka priyadarshana wrote:
>>>> hi all
>>>>
>>>>
>>>> my database server is running on one machine and the application
>>>> is running on another machine(simple java application use to access
>>>> the database).
>>>>
>>>> so i want to know, what is the protocol that use to communicate
>>>> between those two applications...?
>>>
>>> JDBC.
>>>
>>
>> not exactly. JDBC is the API your app uses to access the
>> database. the JDBC class libraries for postgres on the client
>> system will use postgres's native protocol to talk to the PG Server
>> (default of 5432/tcp)
>
> Well, with any network communication, there are multiple layers of
> protocols involved. You took it one layer below JDBC, but we could
> keep on going down to the physical layer link protocol. Since the
> O.P. was asking on a JDBC mailing list, I assumed he was interested in
> that layer.
>
His first e-mail was asking for an example of how to do a connection
pooling in Java using JDBC.
I think he was trying to ask that same question and accidentally used
the word 'protocol'. My guess is English is not his first language.
Maybe someone could post a URL to some connection pooling examples and
documentation?
--James
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2007-02-09 14:15 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-22 06:58 use connection pooling janaka priyadarshana <rpjanaka@gmail.com>
2007-02-08 09:45 ` janaka priyadarshana <rpjanaka@gmail.com>
2007-02-08 17:26 ` Guy Rouillier <guyr-ml1@burntmail.com>
2007-02-08 18:22 ` John R Pierce <pierce@hogranch.com>
2007-02-09 00:51 ` Guy Rouillier <guyr-ml1@burntmail.com>
2007-02-09 12:54 ` Vit Timchishin <tivv@gtech-ua.com>
2007-02-09 14:15 ` James Neff <jneff@tethyshealth.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox