| | |
| | | return logger; |
| | | } |
| | | |
| | | protected OracleConvertJobContext prepareJobContext(String filterPath) |
| | | protected AbstractOracleJobContext prepareJobContext(String filterPath) |
| | | { |
| | | return new OracleConvertJobContext(filterPath); |
| | | } |
| | |
| | | logger.info(jobName + " fired at " + new Date()); |
| | | extractJobConfiguration(jobDetail); |
| | | |
| | | OracleConvertJobContext jobContext = prepareJobContext(_filterPath); |
| | | OracleConvertJobContext jobContext = (OracleConvertJobContext) prepareJobContext(_filterPath); |
| | | jobContext.setConnectionInfo(_oracleHost, _oraclePort, _oracleInstance); |
| | | jobContext.setLogin(_username, _password); |
| | | jobContext.setShapeData(_dataPath); |
| | | jobContext.setExecutionContext(context); |
| | | |
| | | try |
| | | { |
| | |
| | | |
| | | logger.info("begin convert job:[" + map.size() + "]:testmode=" + _testMode); |
| | | jobContext.startTransaction(); |
| | | int total = map.size(); |
| | | int step = total / 100; |
| | | int current = 0; |
| | | jobContext.getExecutionContext().put("ConvertDgn2ShpJobProgress", 0); |
| | | for (OrderedMapIterator it = map.orderedMapIterator(); it.hasNext();) |
| | | { |
| | | it.next(); |
| | |
| | | jobContext.commitTransaction(); |
| | | System.gc(); |
| | | } |
| | | |
| | | int now = order % step; |
| | | if (now != current) |
| | | { |
| | | current = now; |
| | | jobContext.getExecutionContext().put("ConvertDgn2ShpJobProgress", current); |
| | | } |
| | | } |
| | | jobContext.getExecutionContext().put("ConvertDgn2ShpJobProgress", 100); |
| | | |
| | | jobContext.commitTransaction(); |
| | | logger.info("end convert job:[" + order + "]"); |