本文整理匯總了Java中org.wso2.carbon.ndatasource.rdbms.RDBMSConfiguration類的典型用法代碼示例。如果您正苦於以下問題:Java RDBMSConfiguration類的具體用法?Java RDBMSConfiguration怎麽用?Java RDBMSConfiguration使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RDBMSConfiguration類屬於org.wso2.carbon.ndatasource.rdbms包,在下文中一共展示了RDBMSConfiguration類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handleExternalDataSource
import org.wso2.carbon.ndatasource.rdbms.RDBMSConfiguration; //導入依賴的package包/類
private void handleExternalDataSource(RDBMSConfiguration config, Map<String, String> props)
throws XMLStreamException {
String dataSourcePropsString = props
.remove(RDBMSDataSourceConstants.DATASOURCE_PROPS_NAME);
if (dataSourcePropsString != null) {
Map<String, String> dsProps = DBUtils.extractProperties(AXIOMUtil
.stringToOM(dataSourcePropsString));
List<DataSourceProperty> dspList = new ArrayList<DataSourceProperty>();
DataSourceProperty tmpProp;
for (Entry<String, String> dsProp : dsProps.entrySet()) {
tmpProp = new DataSourceProperty();
tmpProp.setEncrypted(false);
tmpProp.setName(dsProp.getKey());
tmpProp.setValue(dsProp.getValue());
dspList.add(tmpProp);
}
config.setDataSourceProps(dspList);
}
}
示例2: createConfigFromProps
import org.wso2.carbon.ndatasource.rdbms.RDBMSConfiguration; //導入依賴的package包/類
private RDBMSConfiguration createConfigFromProps(Map<String, String> props)
throws DataSourceException, XMLStreamException {
/* create a copy first */
props = new HashMap<String, String>(props);
RDBMSConfiguration config = new RDBMSConfiguration();
this.handleExternalDataSource(config, props);
this.filterJDBCPoolProps(props);
RDBMSDataSourceUtils.assignBeanProps(config,
new HashMap<String, Object>(props));
this.handlePostConfigInit(config);
return config;
}
示例3: handlePostConfigInit
import org.wso2.carbon.ndatasource.rdbms.RDBMSConfiguration; //導入依賴的package包/類
private void handlePostConfigInit(RDBMSConfiguration config) {
if (this.getPrimaryDynAuth() != null) {
config.setAlternateUsernameAllowed(true);
}
}