How can I spoof a jndi lookup for a datasource without a app server

后端 未结 3 1384
别跟我提以往
别跟我提以往 2021-02-04 18:24

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 no

3条回答
  •  忘掉有多难
    2021-02-04 18:54

    The solutions listed here look a bit simpler than what I came up with about a year ago when I had to do the same thing. I basically made my own very simple DataSource implementation and adding it to a new Initial Context.

    http://penguindreams.org/blog/running-beans-that-use-application-server-datasources-locally/

提交回复
热议问题