有没有人使用websphere JDBCResourcesWithJMX和oracle数据源?我无法为oracle数据源设置“url”参数,也找不到任何示例... 任何帮助将不胜感激.. 感谢..
答案 0 :(得分:0)
在示例java源代码JDBCResourcesWithJMX中,您应该能够通过编辑源代码来设置Oracle数据源的URL属性:
// the attribute DataSource.relationResourceAdapter is required
// in addition to the attributes in the template
AttributeList dsAttrs = new AttributeList();
dsAttrs.add(new Attribute("name", dataSourceName));
// override some other props in the template
dsAttrs.add(new Attribute("URL", "jdbc:oracle:thin:@//localhost:1521/sample"));
dsAttrs.add(new Attribute("description", dataSourceName));
dsAttrs.add(new Attribute("jndiName", "jdbc/" + dataSourceName));