File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic


vasu maj
Ranch Hand
Posts: 396
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic