class JdbcReportDataSourceServiceFactory implements ReportDataSourceServiceFactory {

	public ReportDataSourceService createService(ReportDataSource reportDataSource) {
		if (!(reportDataSource instanceof JdbcReportDataSource)) {
			throw new JSException("jsexception.invalid.jdbc.datasource", new Object[] {reportDataSource.getClass()});
		}
        JdbcReportDataSource jdbcDataSource = updateJdbcReportDataSource((JdbcReportDataSource) reportDataSource);
        DataSource dataSource = getPoolDataSource(jdbcDataSource.getDriverClass(), jdbcDataSource.getConnectionUrl(),
				jdbcDataSource.getUsername(), jdbcDataSource.getPassword());
        return getDataDataServiceInstance(dataSource, getTimeZoneByDataSourceTimeZone(jdbcDataSource.getTimezone()));
	}

	public  JdbcReportDataSourceServiceFactory();

}