[Dive4elements-commits] [PATCH 1 of 2] Removed obsolete imports
Wald Commits
scm-commit at wald.intevation.org
Fri Apr 5 09:05:21 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1365145175 -7200
# Node ID a2da78fdbec090a2ae9a19da2eb04ca6f0a08835
# Parent 673f68bb19a49387a57aa83cf2e98acf6db5fa03
Removed obsolete imports.
diff -r 673f68bb19a4 -r a2da78fdbec0 flys-backend/src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java
--- a/flys-backend/src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java Thu Apr 04 18:15:35 2013 +0200
+++ b/flys-backend/src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java Fri Apr 05 08:59:35 2013 +0200
@@ -1,16 +1,7 @@
package de.intevation.flys.backend;
-import java.lang.management.ManagementFactory;
-
import java.util.Properties;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.NotCompliantMBeanException;
-import javax.management.ObjectName;
-
import org.apache.log4j.Logger;
import org.hibernate.SessionFactory;
@@ -20,14 +11,12 @@
import org.hibernate.impl.SessionFactoryImpl;
-import org.hibernate.jmx.StatisticsService;
-
public final class SessionFactoryProvider
{
private static Logger log = Logger.getLogger(SessionFactoryProvider.class);
- public static final boolean ENABLE_JMX =
- Boolean.getBoolean("flys.backend.enablejmx");
+ //public static final boolean ENABLE_JMX =
+ // Boolean.getBoolean("flys.backend.enablejmx");
private static SessionFactory flysSessionFactory;
private static SessionFactory sedDBSessionFactory;
@@ -66,19 +55,22 @@
SessionFactory factory = cfg.buildSessionFactory();
+ /*
if (ENABLE_JMX) {
registerAsMBean(factory);
}
else {
log.info("No JMX support for hibernate.");
}
+ */
return factory;
}
+ /** XXX: Commented out till it is configured correctly.
public static void registerAsMBean(SessionFactory factory) {
- /* XXX: Commented out till it is configured correctly.
+ //
StatisticsService statsMBean = new StatisticsService();
statsMBean.setSessionFactory(factory);
@@ -104,8 +96,8 @@
catch (NotCompliantMBeanException ncmbe) {
log.warn(ncmbe, ncmbe);
}
- */
}
+ */
public static Configuration createConfiguration() {
return createConfiguration(FLYSCredentials.getInstance());
@@ -116,7 +108,7 @@
) {
Configuration cfg = new Configuration();
- for (Class clazz: credentials.getClasses()) {
+ for (Class<?> clazz: credentials.getClasses()) {
cfg.addAnnotatedClass(clazz);
}
diff -r 673f68bb19a4 -r a2da78fdbec0 flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentDensityParser.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentDensityParser.java Thu Apr 04 18:15:35 2013 +0200
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SedimentDensityParser.java Fri Apr 05 08:59:35 2013 +0200
@@ -1,5 +1,9 @@
package de.intevation.flys.importer.parsers;
+import de.intevation.flys.importer.ImportDepth;
+import de.intevation.flys.importer.ImportSedimentDensity;
+import de.intevation.flys.importer.ImportSedimentDensityValue;
+
import java.io.File;
import java.io.IOException;
@@ -9,20 +13,13 @@
import java.text.ParseException;
import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
import java.util.List;
+
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.log4j.Logger;
-import de.intevation.flys.importer.ImportDepth;
-import de.intevation.flys.importer.ImportSedimentDensity;
-import de.intevation.flys.importer.ImportSedimentDensityValue;
-import de.intevation.flys.utils.DateGuesser;
-
-
public class SedimentDensityParser extends LineParser {
private static final Logger log =
More information about the Dive4elements-commits
mailing list