如何在WebSphere 8.5 Liberty Profile中定义自定义DataStoreHelper

时间:2014-10-29 12:22:24

标签: java datasource websphere-8 websphere-liberty

如何在WebSphere Liberty Profile中定义自己的DataStoreHelper?

在WebSphere 8服务器配置中,我可以在 DataSource =>下定义它。指定用户定义的数据存储帮助程序

enter image description here

但在Liberty Profile中,我发现没有任何可能在DataSource上定义它!

我对DataSource的server.xml配置如下:

<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>

有什么想法吗?它有可能吗?


编辑1

我问,因为我想使用一个emebdded HSQL-DB,它会抛出我想要阻止的以下异常(因为除了最后触发的清理之外,数据提取工作正常):

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

所以我尝试通过在构造函数中调用以下代码来扩展GenericDataStoreHelper

getMetaData().setGetTypeMapSupport(false);

但......还有其他可能解决这个问题的方法吗?

2 个答案:

答案 0 :(得分:1)

Liberty配置文件不支持DataStoreHelper。如果您需要某些功能,我建议您open a WebSphere RFE。我建议您提供您尝试解决的高级问题,而不是针对DataSourceHelper的特定请求。

答案 1 :(得分:1)

您的问题的简短回答是您不需要这样做才能在Liberty中使用HyperSQL驱动程序。经过一些调查后,您报告的问题似乎是HyperSQL驱动程序未实现可选方法所暴露的错误。该问题已经出现缺陷。发布未来问题的Liberty版本信息将增加回答的可能性。