0
votes

How can I define my own DataStoreHelper in a WebSphere Liberty Profile?

In WebSphere 8 server configuration I'm able to define it under DataSource => Specify a user-defined data store helper

enter image description here

But in a Liberty Profile I don't find any possibility to define this on a DataSource!

My server.xml configuration for the DataSource looks like:

<dataSource id="HSQLDerbyDatasource" jndiName="jdbc/myConnection" statementCacheSize="10">
    <jdbcDriver javax.sql.ConnectionPoolDataSource="org.hsqldb.jdbc.JDBCDataSource" libraryRef="hsqlLib"/>
    <properties.derby.embedded databaseName="${shared.resource.dir}/databases/hsql/myDB" user="foo" password="bar"/>
    <connectionManager agedTimeout="7200" connectionTimeout="180" maxIdleTime="1800" maxPoolSize="10" minPoolSize="1" purgePolicy="EntirePool" reapTime="180"/>
</dataSource>

Any ideas? Is it possible at all?


edit 1

I'm asking, because I want to use an emebdded HSQL-DB which throws the following exception which I want to prevent (because the data fetch is working perfectly except the triggered cleanup at the end):

java.sql.SQLFeatureNotSupportedException: feature not supported
    at org.hsqldb.jdbc.JDBCUtil.notSupported(Unknown Source)
    at org.hsqldb.jdbc.JDBCConnection.setTypeMap(Unknown Source)
    at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.setTypeMap(WSRdbManagedConnectionImpl.java:4762)
    ... 1 more

So I tried to extend the GenericDataStoreHelper by calling the following code in the constructor:

getMetaData().setGetTypeMapSupport(false);

But... is there another possibility to solve this problem?

2

2 Answers

1
votes

DataStoreHelper is not supported on the Liberty profile. If there is some functionality that you require, I recommend that you open a WebSphere RFE. I recommend giving the high-level problem you're trying to solve rather than the specific request for DataSourceHelper.

1
votes

The short answer to your question is you don't need to do so in order to use the HyperSQL driver in Liberty. After some investigation, the problem you've reported appears to be a bug exposed by the HyperSQL driver not implementing an optional method. A defect has been opened for the issue. Posting the Liberty version info for future questions will increase the likelihood of an answer.