From fc37383e498508fd3d40e39def99fc684e6f41f8 Mon Sep 17 00:00:00 2001 From: ?? ? <ulysseskao@ximple.com.tw> Date: Tue, 01 Nov 2011 15:11:14 +0800 Subject: [PATCH] --- xdgnjobs/ximple-jobcarrier/pom.xml | 8 ++++ xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml | 35 ++++++++--------- xdgnjobs/pom.xml | 16 ++++++++ xdgnjobs/ximple-jobcarrier/src/main/resources/quartz.properties | 3 - xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java | 3 + xdgnjobs/ximple-spatialjob/pom.xml | 8 ++++ xdgnjobs/ximple-jobcarrier/quartz_jobs.xml | 33 +++++++++------- xdgnjobs/ximple-jobcarrier/log4j.properties | 2 8 files changed, 70 insertions(+), 38 deletions(-) diff --git a/xdgnjobs/pom.xml b/xdgnjobs/pom.xml index 0dfe790..6c55e42 100644 --- a/xdgnjobs/pom.xml +++ b/xdgnjobs/pom.xml @@ -320,6 +320,22 @@ <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> <version>2.1.0</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.6.3</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.6.3</version> </dependency> <dependency> <groupId>org.awl</groupId> diff --git a/xdgnjobs/ximple-jobcarrier/log4j.properties b/xdgnjobs/ximple-jobcarrier/log4j.properties index cd4d738..2498586 100644 --- a/xdgnjobs/ximple-jobcarrier/log4j.properties +++ b/xdgnjobs/ximple-jobcarrier/log4j.properties @@ -25,4 +25,4 @@ # Print messages of level INFO or above for examples log4j.logger.org.cavaness.quartzbook=INFO -log4j.logger.com.ximple.eofms=INFO \ No newline at end of file +log4j.logger.com.ximple.eofms=DEBUG \ No newline at end of file diff --git a/xdgnjobs/ximple-jobcarrier/pom.xml b/xdgnjobs/ximple-jobcarrier/pom.xml index 0ed209b..62cb18c 100644 --- a/xdgnjobs/ximple-jobcarrier/pom.xml +++ b/xdgnjobs/ximple-jobcarrier/pom.xml @@ -62,6 +62,14 @@ <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </dependency> <dependency> <groupId>javax.transaction</groupId> diff --git a/xdgnjobs/ximple-jobcarrier/quartz_jobs.xml b/xdgnjobs/ximple-jobcarrier/quartz_jobs.xml index 53bfdb0..ad62a0a 100644 --- a/xdgnjobs/ximple-jobcarrier/quartz_jobs.xml +++ b/xdgnjobs/ximple-jobcarrier/quartz_jobs.xml @@ -1,19 +1,21 @@ <?xml version='1.0' encoding='utf-8'?> <job-scheduling-data xmlns="http://www.quartz-scheduler.org/xml/JobSchedulingData" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.quartz-scheduler.org/xml/JobSchedulingData http://www.quartz-scheduler.org/xml/job_scheduling_data_1_8.xsd" - version="1.8"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.quartz-scheduler.org/xml/JobSchedulingData http://www.quartz-scheduler.org/xml/job_scheduling_data_1_8.xsd" + version="1.8"> - <!--pre-processing-commands> - <delete-jobs-in-group>*</delete-jobs-in-group> - <delete-triggers-in-group>*</delete-triggers-in-group> - </pre-processing-commands> + <pre-processing-commands> + <delete-jobs-in-group>*</delete-jobs-in-group> <!-- clear all jobs in scheduler --> + <delete-triggers-in-group>*</delete-triggers-in-group> <!-- clear all triggers in scheduler --> + </pre-processing-commands> - <processing-directives> - <overwrite-existing-data>true</overwrite-existing-data> - <ignore-duplicates>false</ignore-duplicates> - </processing-directives--> + <processing-directives> + <!-- if there are any jobs/trigger in scheduler of same name (as in this file), overwrite them --> + <overwrite-existing-data>true</overwrite-existing-data> + <!-- if there are any jobs/trigger in scheduler of same name (as in this file), and over-write is false, ignore them rather then generating an error --> + <ignore-duplicates>false</ignore-duplicates> + </processing-directives> <schedule> <job> @@ -21,7 +23,7 @@ <group>DEFAULT</group> <description>A job that convert dgn to postgis</description> <job-class>com.ximple.eofms.jobs.OracleConvertDgn2PostGISJob</job-class> - <volatility>false</volatility> + <!--volatility>false</volatility--> <durability>false</durability> <recover>false</recover> <!--job-data-map allows-transient-data="true"--> @@ -68,11 +70,11 @@ </entry> <entry> <key>ORAUSER</key> - <value>spatialdb</value> + <value>basedb</value> </entry> <entry> <key>ORAPASS</key> - <value>spatialdb000</value> + <value>basedb000</value> </entry> <entry> <key>ORGSCHEMA</key> @@ -133,11 +135,12 @@ <job-group>DEFAULT</job-group> <start-time>2011-03-01T18:00:00</start-time> <!-- repeat indefinitely every 10 seconds --> - <repeat-count>1</repeat-count> + <repeat-count>0</repeat-count> <repeat-interval>500</repeat-interval> <!-- <repeat-interval>72000000</repeat-interval> --> </simple> </trigger> </schedule> + </job-scheduling-data> diff --git a/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz.properties b/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz.properties index be4ac14..7341499 100644 --- a/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz.properties +++ b/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz.properties @@ -23,14 +23,11 @@ org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingJobHistoryPlugin org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin -#org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin org.quartz.plugin.jobInitializer.fileNames = quartz_jobs.xml #org.quartz.plugin.jobInitializer.fileNames = quartz_jobs_edb.xml -org.quartz.plugin.jobInitializer.overWriteExistingJobs = true org.quartz.plugin.jobInitializer.failOnFileNotFound = true -#org.quartz.plugin.jobInitializer.validating=false org.quartz.plugin.jobInitializer.scanInterval = 10 org.quartz.plugin.jobInitializer.wrapInUserTransaction = false diff --git a/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml b/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml index 866ca82..a1ae3d4 100644 --- a/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml +++ b/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml @@ -1,23 +1,21 @@ <?xml version='1.0' encoding='utf-8'?> <job-scheduling-data xmlns="http://www.quartz-scheduler.org/xml/JobSchedulingData" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.quartz-scheduler.org/xml/JobSchedulingData http://www.quartz-scheduler.org/xml/job_scheduling_data_1_8.xsd" - version="1.8"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.quartz-scheduler.org/xml/JobSchedulingData http://www.quartz-scheduler.org/xml/job_scheduling_data_1_8.xsd" + version="1.8"> - <pre-processing-commands> - <delete-jobs-in-group>*</delete-jobs-in-group> - <!-- clear all jobs in scheduler --> - <delete-triggers-in-group>*</delete-triggers-in-group> - <!-- clear all triggers in scheduler --> - </pre-processing-commands> + <pre-processing-commands> + <delete-jobs-in-group>*</delete-jobs-in-group> <!-- clear all jobs in scheduler --> + <delete-triggers-in-group>*</delete-triggers-in-group> <!-- clear all triggers in scheduler --> + </pre-processing-commands> - <processing-directives> - <!-- if there are any jobs/trigger in scheduler of same name (as in this file), overwrite them --> - <overwrite-existing-data>true</overwrite-existing-data> - <!-- if there are any jobs/trigger in scheduler of same name (as in this file), and over-write is false, ignore them rather then generating an error --> - <ignore-duplicates>false</ignore-duplicates> - </processing-directives> + <processing-directives> + <!-- if there are any jobs/trigger in scheduler of same name (as in this file), overwrite them --> + <overwrite-existing-data>true</overwrite-existing-data> + <!-- if there are any jobs/trigger in scheduler of same name (as in this file), and over-write is false, ignore them rather then generating an error --> + <ignore-duplicates>false</ignore-duplicates> + </processing-directives> <schedule> <job> @@ -25,7 +23,7 @@ <group>DEFAULT</group> <description>A job that convert dgn to postgis</description> <job-class>com.ximple.eofms.jobs.OracleConvertDgn2PostGISJob</job-class> - <volatility>false</volatility> + <!--volatility>false</volatility--> <durability>false</durability> <recover>false</recover> <!--job-data-map allows-transient-data="true"--> @@ -72,11 +70,11 @@ </entry> <entry> <key>ORAUSER</key> - <value>spatialdb</value> + <value>BASEDB</value> </entry> <entry> <key>ORAPASS</key> - <value>spatialdb000</value> + <value>basedb000</value> </entry> <entry> <key>ORGSCHEMA</key> @@ -144,4 +142,5 @@ </trigger> </schedule> + </job-scheduling-data> diff --git a/xdgnjobs/ximple-spatialjob/pom.xml b/xdgnjobs/ximple-spatialjob/pom.xml index 5bffdb7..0e9bbdf 100644 --- a/xdgnjobs/ximple-spatialjob/pom.xml +++ b/xdgnjobs/ximple-spatialjob/pom.xml @@ -55,6 +55,14 @@ <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </dependency> <dependency> <groupId>org.geotools</groupId> diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java index 9505fb3..bc8c675 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java @@ -119,10 +119,11 @@ at.transform(srcPt, 0, dstPt, 0, 4); - Coordinate[] coords = new Coordinate[4]; + Coordinate[] coords = new Coordinate[5]; for (int i = 0; i < 4; i++) { coords[i] = new Coordinate(dstPt[i*2], dstPt[i*2+1]); } + coords[4] = new Coordinate(dstPt[0], dstPt[1]); int srid = gobj.getSRID(); gobj = geometryFactory.createPolygon(geometryFactory.createLinearRing(coords), null); if (gobj.getSRID() != srid) { -- Gitblit v0.0.0-SNAPSHOT