How to use multiple JDBC drivers in the same application?

前端 未结 2 1044
长情又很酷
长情又很酷 2021-01-17 23:01

As far as I understand, as soon as I execute

Class.forName(\"net.sourceforge.jtds.jdbc.Driver\");

I initialize the application to use JTDS

2条回答
  •  春和景丽
    2021-01-17 23:29

    You need to use DataSource. Configure a DataSource for each type of connection and the use the appropriate DataSource each time (e.g. via the proper DAO)

提交回复
热议问题