File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Connection using DataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Connection using DataSource" Watch "Connection using DataSource" New topic
Author

Connection using DataSource

Krishan Chauhan
Ranch Hand

Joined: Mar 12, 2008
Posts: 32
Hi All

Could any one tell me how to connect to Database using DataSource in a standalone application and why is it preffered way over Driver Manager? Is it possible to achieve this without JNDI? Thanks
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3652

Data sources are nice because they can be managed in the administration console of the server, rather than in the source code or some text file. How you set them up, though, is server platform dependent. Often time there are XML files you can use to configure them.
[ March 23, 2008: Message edited by: Scott Selikoff ]

My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection using DataSource
 
Similar Threads
Connection pooling
Problem deploying first EJB
java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory for unitName DemoJPA
XA-Transaction Error with WAS 6.1, MQ (SIB) and Oracle 10g
Accessing a datasource from outside JBoss