db2 - BasicDataSource not having property for clientProgramName - Stack Overflow

In my application we are creating connection pool as shown below<bean id="dataSource" cla

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.

Share Improve this question edited Nov 19, 2024 at 5:19 James Z 12.3k10 gold badges27 silver badges47 bronze badges asked Nov 18, 2024 at 21:32 SanjaySanjay 3133 silver badges15 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I was able to resolve this issue by updating the url as showm below.

jdbc:db2://<host>:<port>/<DB>:currentSchema=<schema>;clientProgramName=MyApp;

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745593088a4634946.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信