How to dynamically add datasources to jboss 7

后端 未结 1 1193
[愿得一人]
[愿得一人] 2021-01-25 14:59

I have an application which dynamically adds databases for each instance of the application, and which then, on JBoss 5 would write a datasource file out into the deploy folder,

相关标签:
1条回答
  • 2021-01-25 15:24

    In newer version of JBoss AS7 -ds.xml strategy will work.

    But management CLI offer you another way to perform it (as they will be no scanning delay it is probably a more recommended way).

    You can either call jboss-cli.sh with command file (detail on how to do it can be found here: http://planet.jboss.org/post/how_to_create_an_manage_datasources_in_as7) or you can use the directly the native API (https://docs.jboss.org/author/display/AS71/The+native+management+API).

    With the later method in addition to add, you will be able to query the existing data sources and update them.

    0 讨论(0)
提交回复
热议问题