pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedmysql/posgresql pooling
6+ messages / 4 participants
[nested] [flat]
* mysql/posgresql pooling
@ 2005-05-03 12:53 Nico <nicohmail-postgresql@yahoo.com>
2005-05-03 17:13 ` Re: mysql/posgresql pooling Markus Schaber <schabi@logix-tt.com>
2005-05-03 17:43 ` Re: mysql/posgresql pooling John R Pierce <pierce@hogranch.com>
0 siblings, 2 replies; 6+ messages in thread
From: Nico @ 2005-05-03 12:53 UTC (permalink / raw)
To: pgsql-jdbc
Hi, I run a servlet that runs on a Resin 3.0.2-webserver with MySQL and
PostgreSQL database server.
Operating system is Red Hat Enterprise Linux ES release 3 (Taroon Update 4).
Resin uses its own pooling mechanism. I can make normal connections through
both MySQL and PostgreSQL. However, when I try to get a connection from a
pool, only MySQL connections are returned. How do I tell my servlet it needs
a PostgreSQL connection instead of MySQL?
Kind regards,
Nico.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: mysql/posgresql pooling
2005-05-03 12:53 mysql/posgresql pooling Nico <nicohmail-postgresql@yahoo.com>
@ 2005-05-03 17:13 ` Markus Schaber <schabi@logix-tt.com>
1 sibling, 0 replies; 6+ messages in thread
From: Markus Schaber @ 2005-05-03 17:13 UTC (permalink / raw)
To: Nico <nicohmail-postgresql@yahoo.com>; +Cc: pgsql-jdbc
Hi, Nico,
Nico wrote:
> Hi, I run a servlet that runs on a Resin 3.0.2-webserver with MySQL and
> PostgreSQL database server.
> Operating system is Red Hat Enterprise Linux ES release 3 (Taroon Update 4).
> Resin uses its own pooling mechanism. I can make normal connections through
> both MySQL and PostgreSQL. However, when I try to get a connection from a
> pool, only MySQL connections are returned. How do I tell my servlet it needs
> a PostgreSQL connection instead of MySQL?
How do you communicate with the pool? I do not know anything about the
Resin interfaces, but in jboss, you use jndi to look up your datasources
by a datasource name, and have *-ds.xml files that define the
datasources (map name to driver class, host name, port, username and
other connection properties).
To get a PostgreSQL connection, you need do deploy the appropriate
definition in one of your *-ds.xml files, and then use this name when
looking up your datasource.
You do this along the lines of:
import java.sql.Connection;
import javax.naming.InitialContext;
import javax.sql.DataSource;
public class example {
public static Connection getConnection(String name) throws Exception {
InitialContext ic = new InitialContext();
DataSource dataSource = (DataSource) ic.lookup(name);
return dataSource.getConnection();
}
}
HTH,
Markus
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: mysql/posgresql pooling
2005-05-03 12:53 mysql/posgresql pooling Nico <nicohmail-postgresql@yahoo.com>
@ 2005-05-03 17:43 ` John R Pierce <pierce@hogranch.com>
1 sibling, 0 replies; 6+ messages in thread
From: John R Pierce @ 2005-05-03 17:43 UTC (permalink / raw)
To: Nico <nicohmail-postgresql@yahoo.com>; +Cc: pgsql-jdbc
Nico wrote:
> Hi, I run a servlet that runs on a Resin 3.0.2-webserver with MySQL and
> PostgreSQL database server.
> Operating system is Red Hat Enterprise Linux ES release 3 (Taroon Update 4).
> Resin uses its own pooling mechanism. I can make normal connections through
> both MySQL and PostgreSQL. However, when I try to get a connection from a
> pool, only MySQL connections are returned. How do I tell my servlet it needs
> a PostgreSQL connection instead of MySQL?
I dunno anything about that stuff specifically, but any time you're pooling
resources, and you have different sorts of resources, it makes sense to have
different pools. In this case, it would be one pool for each database, so you
query the specific pool holding the class of resource you want....
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: mysql/posgresql pooling
@ 2005-05-03 15:49 Zachery Jensen <zjensen@edustructures.com>
2005-05-03 15:59 ` Re: mysql/posgresql pooling Nico <nicohmail-postgresql@yahoo.com>
0 siblings, 1 reply; 6+ messages in thread
From: Zachery Jensen @ 2005-05-03 15:49 UTC (permalink / raw)
To: pgsql-jdbc
"Resin uses its own pooling mechanism."
This would indicate that you need help from the Resin folks, not the
pgsql folks.
-Zac
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Nico
Sent: Tuesday, May 03, 2005 6:54 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] mysql/posgresql pooling
Hi, I run a servlet that runs on a Resin 3.0.2-webserver with MySQL and
PostgreSQL database server.
Operating system is Red Hat Enterprise Linux ES release 3 (Taroon Update
4).
Resin uses its own pooling mechanism. I can make normal connections
through
both MySQL and PostgreSQL. However, when I try to get a connection from
a
pool, only MySQL connections are returned. How do I tell my servlet it
needs
a PostgreSQL connection instead of MySQL?
Kind regards,
Nico.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: mysql/posgresql pooling
2005-05-03 15:49 Re: mysql/posgresql pooling Zachery Jensen <zjensen@edustructures.com>
@ 2005-05-03 15:59 ` Nico <nicohmail-postgresql@yahoo.com>
0 siblings, 0 replies; 6+ messages in thread
From: Nico @ 2005-05-03 15:59 UTC (permalink / raw)
To: pgsql-jdbc
There is only support for those who are owners of a commercial Resin-server
or those who are going to buy it. As for my webhosting-provider, he is not
responding to my questions...
Nico.
""Zachery Jensen"" <zjensen@edustructures.com> schreef in bericht
news:7C1F799CD6F85F4693C5B51236BA899BC4842B@mail1.planetsoftware.com...
> "Resin uses its own pooling mechanism."
>
> This would indicate that you need help from the Resin folks, not the
> pgsql folks.
>
> -Zac
>
> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Nico
> Sent: Tuesday, May 03, 2005 6:54 AM
> To: pgsql-jdbc@postgresql.org
> Subject: [JDBC] mysql/posgresql pooling
>
> Hi, I run a servlet that runs on a Resin 3.0.2-webserver with MySQL and
> PostgreSQL database server.
> Operating system is Red Hat Enterprise Linux ES release 3 (Taroon Update
> 4).
> Resin uses its own pooling mechanism. I can make normal connections
> through
> both MySQL and PostgreSQL. However, when I try to get a connection from
> a
> pool, only MySQL connections are returned. How do I tell my servlet it
> needs
> a PostgreSQL connection instead of MySQL?
>
> Kind regards,
> Nico.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: mysql/posgresql pooling
@ 2005-05-03 16:33 Zachery Jensen <zjensen@edustructures.com>
0 siblings, 0 replies; 6+ messages in thread
From: Zachery Jensen @ 2005-05-03 16:33 UTC (permalink / raw)
To: pgsql-jdbc
That's unfortunate. I'm sure if anyone here knows anything they'd be
happy to help you privately, otherwise I wish you luck finding the
answer.
-Zac
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Nico
Sent: Tuesday, May 03, 2005 9:59 AM
To: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] mysql/posgresql pooling
There is only support for those who are owners of a commercial
Resin-server
or those who are going to buy it. As for my webhosting-provider, he is
not
responding to my questions...
Nico.
""Zachery Jensen"" <zjensen@edustructures.com> schreef in bericht
news:7C1F799CD6F85F4693C5B51236BA899BC4842B@mail1.planetsoftware.com...
> "Resin uses its own pooling mechanism."
>
> This would indicate that you need help from the Resin folks, not the
> pgsql folks.
>
> -Zac
>
> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Nico
> Sent: Tuesday, May 03, 2005 6:54 AM
> To: pgsql-jdbc@postgresql.org
> Subject: [JDBC] mysql/posgresql pooling
>
> Hi, I run a servlet that runs on a Resin 3.0.2-webserver with MySQL
and
> PostgreSQL database server.
> Operating system is Red Hat Enterprise Linux ES release 3 (Taroon
Update
> 4).
> Resin uses its own pooling mechanism. I can make normal connections
> through
> both MySQL and PostgreSQL. However, when I try to get a connection
from
> a
> pool, only MySQL connections are returned. How do I tell my servlet it
> needs
> a PostgreSQL connection instead of MySQL?
>
> Kind regards,
> Nico.
>
>
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2005-05-03 17:43 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-03 12:53 mysql/posgresql pooling Nico <nicohmail-postgresql@yahoo.com>
2005-05-03 17:13 ` Markus Schaber <schabi@logix-tt.com>
2005-05-03 17:43 ` John R Pierce <pierce@hogranch.com>
2005-05-03 15:49 Re: mysql/posgresql pooling Zachery Jensen <zjensen@edustructures.com>
2005-05-03 15:59 ` Nico <nicohmail-postgresql@yahoo.com>
2005-05-03 16:33 Re: mysql/posgresql pooling Zachery Jensen <zjensen@edustructures.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