From: | "Joeseph Blowseph" <joseph_blowseph(at)hotmail(dot)com> |
---|---|
To: | oliver(at)opencloud(dot)com |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: 'FATAL: database "null" does not exist ' when accessing through a |
Date: | 2006-01-14 16:59:05 |
Message-ID: | BAY101-F71802918C3191E364F52E83190@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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(at)opencloud(dot)com>
>To: Joeseph Blowseph <joseph_blowseph(at)hotmail(dot)com>
>CC: pgsql-jdbc(at)postgresql(dot)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:
>
>>DataSourceClass: org.postgresql.ds.PGSimpleDataSource
>>JNDI Name: jdbc/PGSimple
>>URL: jdbc:postgresql://localhost:5432/PGSQL1
>
>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/
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2006-01-14 21:24:01 | Re: 'FATAL: database "null" does not exist ' when accessing |
Previous Message | Oliver Jowett | 2006-01-14 11:21:12 | Re: 'FATAL: database "null" does not exist ' when accessing |