When creating the connection to a DomSQL database, you can do it with getConnection and the name of a .jdbc config file:
public static Connection getConnection() throws SQLException {
return JdbcUtil.getConnection( FacesContext.getCurrentInstance(), "nameOf.jdbc" );
}
Or use createConnection and specify the path for the connection:
public static Connection getConnection() throws SQLException {
String dbPath = null;
try {
dbPath = ExtLibUtil.getCurrentDatabase().getFilePath().replaceAll( "\\\\", "/" );
} catch( NotesException exception ){
// Ignore
}
return JdbcUtil.createConnectionFromUrl( FacesContext.getCurrentInstance(), "jdbc:domsql:" + dbPath + "/nameOf.domsql" );
}
If you haven't heard of DomSQL: JDBC Access for IBM Domino