Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am trying to create jdbc connection pool to AS400 db in talend runtime. My datasouce configuration file looks as follows and it deploys fine in runtime:
<bean id="poolDataSource" class="com.ibm.as400.access.AS400JDBCConnectionPoolDataSource">
<property name="serverName" value="XXX"/>
<property name="user" value="XXX"/>
<property name="password" value="XXX"/>
</bean>
<bean id="dataSource"
class="com.ibm.as400.access.AS400JDBCConnectionPool" destroy-method="close">
<property name="dataSource" ref="poolDataSource" />
<property name="maxConnections" value="3" />
</bean>
<service ref="dataSource" auto-export="class-hierarchy">
<service-properties>
<entry key="osgi.jndi.service.name" value="jdbc-as400CPds"/>
</service-properties>
</service>
The reason I have to do it this way is because AS400JDBCConnectionPoolDataSource does not handle connection pool functionality (for example, I cannot set number of connections). AS400 jar has its own connection pool class: AS400JDBCConnectionPool which unfortunately does not implement javax.sql.DataSource interface, although it has both required getConnection methods. That's why I try to expose this service under its own class. Unfortunately it seems that my talend job does not like this setup. When I run it, in the log file I see this line: Bundle local_project1.RestWSPrototype3 is waiting for dependencies . Can I somehow configure my job to look for objectClass = AS400JDBCConnectionPool rather then DataSource? Any other advice on how I can setup jdbc connection pool to AS400?
Thank you!
Svetlana