简体   繁体   English

在JBOSS for DB2中创建数据源

[英]Datasource creation in JBOSS for DB2

JBOSS如何使用db2-ds.xml文件为DB2创建数据源对象?

If it is about how to create a DataSource you copy $JBOSS_HOME\\docs\\examples\\jca\\db2-ds.xml to $JBOSS_HOME\\server\\default\\deploy and customize the settings to fit your JDBC connection-url,user-name etc. 如果是关于如何创建数据源的,则将$ JBOSS_HOME \\ docs \\ examples \\ jca \\ db2-ds.xml复制到$ JBOSS_HOME \\ server \\ default \\ deploy并自定义设置以适合您的JDBC连接URL,用户名等。

EDIT: Jboss reads this file, and periodically checks for updates (if configured) and sets up a DataSource which is registered in JNDI and provides a pool of connections depending on underlying driver-class. 编辑:Jboss读取此文件,并定期检查更新(如果已配置),并设置一个在JNDI中注册的数据源,并根据基础驱动程序类提供连接池。 To see how this is done in detail you should throw a glance into the sourcecode. 要详细了解如何完成此操作,您应该对源代码有所了解。 Search for "-ds.xml" a good startingpoint is: $JBOSS_SRC\\console\\src\\main\\org\\jboss\\console\\manager\\DeploymentFileRepository.java which looks for "-ds.xml" files. 搜索“ -ds.xml”的一个很好的起点是:$ JBOSS_SRC \\ console \\ src \\ main \\ org \\ jboss \\ console \\ manager \\ DeploymentFileRepository.java,它查找“ -ds.xml”文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM