admin管理员组文章数量:1026989
In my application we are creating connection pool as shown below
<bean id="dataSource" class=".apachemons.dbcp.BasicDataSource"
destroy-method="close" driverClassName="com.ibm.db2.jcc.DB2Driver"
url="" username="" password="" clientProgramName="JavaClientApp"/>
As per this article, we are trying to set "clientProgramName", but is not working.
We also tried
connectionProperties="clientProgramName='JavaClientApp'"
Same configuration is working fine if i use com.ibm.db2.jcc.DB2SimpleDataSource
instead of BasicDataSource
but DB2SimpleDataSource
does not have connection pool. We want to have connection pool and clientProgramName both.
In my application we are creating connection pool as shown below
<bean id="dataSource" class=".apachemons.dbcp.BasicDataSource"
destroy-method="close" driverClassName="com.ibm.db2.jcc.DB2Driver"
url="" username="" password="" clientProgramName="JavaClientApp"/>
As per this article, we are trying to set "clientProgramName", but is not working.
We also tried
connectionProperties="clientProgramName='JavaClientApp'"
Same configuration is working fine if i use com.ibm.db2.jcc.DB2SimpleDataSource
instead of BasicDataSource
but DB2SimpleDataSource
does not have connection pool. We want to have connection pool and clientProgramName both.
1 Answer
Reset to default 0I was able to resolve this issue by updating the url as showm below.
jdbc:db2://<host>:<port>/<DB>:currentSchema=<schema>;clientProgramName=MyApp;
In my application we are creating connection pool as shown below
<bean id="dataSource" class=".apachemons.dbcp.BasicDataSource"
destroy-method="close" driverClassName="com.ibm.db2.jcc.DB2Driver"
url="" username="" password="" clientProgramName="JavaClientApp"/>
As per this article, we are trying to set "clientProgramName", but is not working.
We also tried
connectionProperties="clientProgramName='JavaClientApp'"
Same configuration is working fine if i use com.ibm.db2.jcc.DB2SimpleDataSource
instead of BasicDataSource
but DB2SimpleDataSource
does not have connection pool. We want to have connection pool and clientProgramName both.
In my application we are creating connection pool as shown below
<bean id="dataSource" class=".apachemons.dbcp.BasicDataSource"
destroy-method="close" driverClassName="com.ibm.db2.jcc.DB2Driver"
url="" username="" password="" clientProgramName="JavaClientApp"/>
As per this article, we are trying to set "clientProgramName", but is not working.
We also tried
connectionProperties="clientProgramName='JavaClientApp'"
Same configuration is working fine if i use com.ibm.db2.jcc.DB2SimpleDataSource
instead of BasicDataSource
but DB2SimpleDataSource
does not have connection pool. We want to have connection pool and clientProgramName both.
1 Answer
Reset to default 0I was able to resolve this issue by updating the url as showm below.
jdbc:db2://<host>:<port>/<DB>:currentSchema=<schema>;clientProgramName=MyApp;
本文标签: db2BasicDataSource not having property for clientProgramNameStack Overflow
版权声明:本文标题:db2 - BasicDataSource not having property for clientProgramName - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745593086a2158001.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论