How can I spoof a jndi lookup for a datasource without a app server
Posted
by Wiszh
on Stack Overflow
See other posts from Stack Overflow
or by Wiszh
Published on 2010-06-14T18:14:33Z
Indexed on
2010/06/14
18:32 UTC
Read the original article
Hit count: 353
I want to test some new functionality which is part of an internal web app. This new code uses a database connection normally provided by an app server (tomcat).
I do not want to recreate the entire web app on my local machine to test the new code, since I only need to run one function.
Does anyone know how I can 'spoof' a Context, or Datasource, to retrieve the database config, without actually creating a web app instance on a server?
Thanks
© Stack Overflow or respective owner