Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DataSource

 
vasu maj
Ranch Hand
Posts: 396
  • 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?


Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic