本文整理汇总了Java中org.osgi.service.jdbc.DataSourceFactory.JDBC_DATASOURCE_NAME属性的典型用法代码示例。如果您正苦于以下问题:Java DataSourceFactory.JDBC_DATASOURCE_NAME属性的具体用法?Java DataSourceFactory.JDBC_DATASOURCE_NAME怎么用?Java DataSourceFactory.JDBC_DATASOURCE_NAME使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.osgi.service.jdbc.DataSourceFactory
的用法示例。
在下文中一共展示了DataSourceFactory.JDBC_DATASOURCE_NAME属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: rejectUnsupportedOptions
/**
* Checker method that will throw if any unsupported standard OSGi options
* is present.
*
* @param p the properties to check
* @throws SQLFeatureNotSupportedException if unsupported properties are
* present
*/
private static void rejectUnsupportedOptions(Properties p)
throws SQLFeatureNotSupportedException {
// Unsupported standard properties in OSGi
if (p.containsKey(DataSourceFactory.JDBC_ROLE_NAME)) {
throw new SQLFeatureNotSupportedException("The " +
DataSourceFactory.JDBC_ROLE_NAME +
" property is not supported by H2");
}
if (p.containsKey(DataSourceFactory.JDBC_DATASOURCE_NAME)) {
throw new SQLFeatureNotSupportedException("The " +
DataSourceFactory.JDBC_DATASOURCE_NAME +
" property is not supported by H2");
}
}
示例2: provider_target
@AttributeDefinition(
name = "Transaction Resource Provider",
description = "The Resource Provider target for the transaction, typically the DataSource",
defaultValue ="("+DataSourceFactory.JDBC_DATASOURCE_NAME+"=addressBookDS)", required = true)
String provider_target();