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 DataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DataSource" Watch "DataSource" New topic
Author

DataSource

vasu maj
Ranch Hand

Joined: Jul 12, 2001
Posts: 395
I have a need to get a DataSource object to be passed to a method. I am testing it locally using a class with main method and so can not usde JNDI context to look up from server's environment. The actual code is like this

which works fine when the server is running as it gets it from environment.

But when I want to run the code locally with a test class I can't get the dataSource.I see that DataSource class doesn't have setters for URL, login, password etc. Is there a way to get DataSource object locally?


Thanks


What a wonderful world!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DataSource