pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
javax.sql.DataSource implementation
2+ messages / 2 participants
[nested] [flat]

* javax.sql.DataSource implementation
@ 2009-07-12 22:00  diego.vera@capgemini-sdm.com
  0 siblings, 1 reply; 2+ messages in thread

From: diego.vera@capgemini-sdm.com @ 2009-07-12 22:00 UTC (permalink / raw)
  To: pgsql-jdbc

Hi all,

I am using Jsecurity with postgresql and I require an implementation of the javax.sql.DataSource, I reviewed the source code of the jdbc driver and It seems that it is not implemented. Do you know where could I get it? Or should I implement my DataSource? I thouhg it should be part of the jdbc driver.

Best regards,

-Diego Vera

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: javax.sql.DataSource implementation
@ 2009-07-13 00:51  Scott Dunbar <scott@xigole.com>
  parent: diego.vera@capgemini-sdm.com
  0 siblings, 0 replies; 2+ messages in thread

From: Scott Dunbar @ 2009-07-13 00:51 UTC (permalink / raw)
  To: pgsql-jdbc

Diego,
I think you're missing an important understanding regarding JDBC and a 
DataSource.  A DataSource is obtained from the container (for example, 
Tomcat) that your application is running in.  There are a few reasons to 
do this.  The most important is to separate the configuration of your 
database connection from your source code.  In pure JDBC you do all of 
the connection configuration yourself - setting the user name, password, 
driver, and so on.  A DataSource, which is acquired through JNDI puts 
all of the configuration of the database connection outside of your code 
and makes it available to your application (or other applications or web 
apps).

The downside of this is that each application server configures this 
differently.  WebLogic does it differently than Tomcat and they are both 
different than WebSphere.  Engines like JBoss and Glassfish muddy the 
waters more.  They embed Tomcat but have different ways of setting up 
the JDNI DataSource.

I don't know what application server you're using but Tomcat has a great 
page at 
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html 
that includes a PostgreSQL specific section.  If you're using a 
different app server then you'll want to read the docs on how to get it 
setup.



diego.vera@capgemini-sdm.com wrote:
>
> Hi all,
>
> I am using Jsecurity with postgresql and I require an implementation 
> of the javax.sql.DataSource, I reviewed the source code of the jdbc 
> driver and It seems that it is not implemented. Do you know where 
> could I get it? Or should I implement my DataSource? I thouhg it 
> should be part of the jdbc driver.
>
> Best regards,
>
> -Diego Vera
>

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2009-07-13 00:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-07-12 22:00 javax.sql.DataSource implementation diego.vera@capgemini-sdm.com
2009-07-13 00:51 ` Scott Dunbar <scott@xigole.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