DataSource lookup - Mailing list pgsql-jdbc

From Nico
Subject DataSource lookup
Date
Msg-id d2od8k$c4s$1@news.hub.org
Whole thread Raw
Responses Re: DataSource lookup
List pgsql-jdbc
How do I find out what's the name of the JNDI data source I need for a
PostgreSQL connection pool?
Currently I do this,

javax.naming.Context env=(javax.naming.Context)
new javax.naming.InitialContext().lookup("java:comp/env");
pool=(DataSource)env.lookup("jdbc/"+dbname);
connection=pool.getConnection("username","password");

but then I get a MySQL connection(MySQL & PostgreSQL run both on server).
I only have permission to my personal account, not the shared directories
where I think the jndi resources are located. In my web.xml are no resources
defined.

Kind regards,
Nico.



pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: JDBC and transactions
Next
From: "Chris White (cjwhite)"
Date:
Subject: Re: JDBC and transactions