| Joeseph Blowseph 2006-01-14, 11:23 am |
| The datasource construction parameters are stored in a data-sources xml file
like this:
<native-data-source name="PGDS1"
data-source-class="org.postgresql.ds.PGPoolingDataSource"
jndi-name="jdbc/PGPooling"
user="postgres" password="password"
url="jdbc:postgresql://localhost:5432/PGSQL1"/>
....
The program code does a jdni lookup for the DataSource. That means that you
don't have to hard-code connection details into the source. But, as things
stand, I have to hard-code the database name.
>From: Oliver Jowett <oliver@opencloud.com>
>To: Joeseph Blowseph < joseph_blowseph@hotm
ail.com>
>CC: pgsql-jdbc@postgresql.org
>Subject: Re: [JDBC] 'FATAL: database "null" does not exist ' when accessing
>through a datasource
>Date: Sat, 14 Jan 2006 11:21:12 +0000
>
>Joeseph Blowseph wrote:
>
>
>If you're using a DataSource, then the internal JDBC URL to use is
>constructed from the parameters used to configure the datasource
>(setDatabaseName, etc).
>
>I don't know what your container is doing with the "JDBC URL" bit, but
>AFAIK it's not used by the datasource at all.
>
>-O
____________________
____________________
____________________
_____
The new MSN Search Toolbar now includes Desktop search!
http://toolbar.msn.co.uk/
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
|