Commit 3dac795e authored by Riegel's avatar Riegel
Browse files

Merge branch 'dev' into 'master'

Version 3.17.0 Release

See merge request !28
1 merge request!28Version 3.17.0 Release
Pipeline #11012 passed with stage
in 1 minute and 10 seconds
Showing with 371 additions and 234 deletions
+371 -234
package de.hft.stuttgart.citydoctor2.gui.tree;
import de.hft.stuttgart.citydoctor2.zip.CityGmlZipEntry;
import javafx.scene.paint.Color;
public class ZipEntryNode {
private final CityGmlZipEntry entry;
public ZipEntryNode(CityGmlZipEntry entry) {
this.entry = entry;
}
public Color getTextColor() {
if (entry.getErrorType() != null) {
return Color.DARKRED;
} else if (entry.getModel() != null) {
if (entry.getModel().getNumberOfFeatures() == 0) {
return Color.GRAY;
}
if (entry.getModel().isValidated()) {
if (entry.getModel().collectErrors().isEmpty()) {
return Color.GREEN;
}
return Color.RED;
}
return Color.BLUE;
} else if (entry.isLoaded()) {
return Color.BLUE;
} else {
return Color.BLACK;
}
}
public String getText() {
return entry.getDisplayName();
}
public CityGmlZipEntry getEntry() {
return entry;
}
}
......@@ -2,6 +2,7 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.control.Tab?>
......@@ -16,7 +17,7 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<VBox prefHeight="800.0" spacing="15.0" xmlns="http://javafx.com/javafx/8.0.221" xmlns:fx="http://javafx.com/fxml/1">
<VBox prefHeight="800.0" spacing="15.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1">
<children>
<TabPane fx:id="tabPane" VBox.vgrow="ALWAYS">
<tabs>
......@@ -51,6 +52,78 @@
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
<VBox fx:id="zipArchiveOptionsVBox" prefHeight="176.0" prefWidth="485.0">
<children>
<HBox prefHeight="100.0" prefWidth="200.0">
<children>
<CheckBox fx:id="streamCheckOption" mnemonicParsing="false"
text="Use low memory mode">
<font>
<Font size="14.0"/>
</font>
</CheckBox>
<Label fx:id="streamCheckLabel" text="(?)" underline="true">
<opaqueInsets>
<Insets/>
</opaqueInsets>
<padding>
<Insets left="3.0"/>
</padding>
<font>
<Font size="14.0"/>
</font>
</Label>
</children>
</HBox>
<VBox fx:id="streamCheckParametersVBox" disable="true" prefHeight="200.0"
prefWidth="100.0">
<children>
<Label fx:id="outputPathLabel" text="Output path:">
<font>
<Font size="14.0"/>
</font>
</Label>
<HBox prefWidth="485.0">
<children>
<TextField fx:id="outputPathTextField" prefHeight="25.0"
prefWidth="291.0">
<font>
<Font size="14.0"/>
</font>
</TextField>
<Button fx:id="outputPathBtn" mnemonicParsing="false" prefHeight="30.0"
prefWidth="86.0" text="Select">
<font>
<Font size="14.0"/>
</font>
</Button>
</children>
</HBox>
<CheckBox fx:id="pdfReportsOption" mnemonicParsing="false"
text="Create PDF reports">
<padding>
<Insets top="10.0"/>
</padding>
<font>
<Font size="14.0"/>
</font>
</CheckBox>
<CheckBox layoutX="10.0" layoutY="60.0" mnemonicParsing="false"
text="Create XML reports" fx:id="xmlReportsOption">
<padding>
<Insets top="10.0"/>
</padding>
<font>
<Font size="14.0"/>
</font>
</CheckBox>
</children>
</VBox>
</children>
<HBox.margin>
<Insets left="30.0"/>
</HBox.margin>
</VBox>
</children>
</HBox>
<HBox spacing="5.0" VBox.vgrow="NEVER">
......
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.ToggleButton?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.HBox?>
<HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox spacing="5.0" HBox.hgrow="NEVER">
......@@ -13,6 +16,13 @@
<ImageView fx:id="openImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
</graphic>
</Button>
<Button id="loadBtn" fx:id="zipManagerBtn" disable="true" mnemonicParsing="false">
<graphic>
<ImageView fx:id="zipManagerView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true"
preserveRatio="true"/>
</graphic>
</Button>
<Separator layoutX="381.0" layoutY="10.0" orientation="VERTICAL"/>
<Button fx:id="checkBtn" mnemonicParsing="false">
<graphic>
<ImageView fx:id="checkImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
......@@ -23,6 +33,7 @@
<ImageView fx:id="reportImageView" disable="true" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
</graphic>
</Button>
<Separator layoutX="116.0" layoutY="10.0" orientation="VERTICAL"/>
<ToggleButton fx:id="gridButton" disable="true" mnemonicParsing="false">
<graphic>
<ImageView fx:id="gridImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
......@@ -75,6 +86,7 @@
</HBox>
<HBox fx:id="spacer" alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0" HBox.hgrow="ALWAYS">
<children>
<Separator orientation="VERTICAL"/>
<Button id="loadBtn" fx:id="saveBtn" disable="true" mnemonicParsing="false">
<graphic>
<ImageView fx:id="saveView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
......
......@@ -3,7 +3,7 @@
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane fx:id="mainPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="400.0" minWidth="400.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1">
<BorderPane fx:id="mainPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="400.0" minWidth="400.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<center>
<SplitPane fx:id="mainContainer" dividerPositions="0.47069431920649235" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="300.0" prefHeight="600.0" prefWidth="1100.0">
<items>
......
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.TitledPane?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<VBox xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1">
<children>
<AnchorPane minHeight="32.0">
<children>
<HBox spacing="5.0" AnchorPane.leftAnchor="0.0">
<children>
<Button fx:id="loadBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="loadImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true"
preserveRatio="true"/>
</graphic>
</Button>
<Button fx:id="decompressBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="decompressImageView" fitHeight="32.0" fitWidth="32.0"
pickOnBounds="true" preserveRatio="true"/>
</graphic>
</Button>
<Button fx:id="showReportBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="showReportImageView" fitHeight="32.0" fitWidth="32.0"
pickOnBounds="true" preserveRatio="true"/>
</graphic>
</Button>
<Separator orientation="VERTICAL"/>
<Button fx:id="decompressAllBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="decompressAllImageView" fitHeight="32.0" fitWidth="32.0"
pickOnBounds="true" preserveRatio="true"/>
</graphic>
</Button>
<Button fx:id="checkAllBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="checkAllImageView" fitHeight="32.0" fitWidth="32.0"
pickOnBounds="true" preserveRatio="true"/>
</graphic>
</Button>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
</padding>
</HBox>
<HBox alignment="TOP_RIGHT" layoutX="296.0" prefHeight="52.0" AnchorPane.rightAnchor="0.0">
<children>
<Button fx:id="saveBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="saveImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true"
preserveRatio="true"/>
</graphic>
</Button>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
</padding>
</HBox>
</children>
</AnchorPane>
<HBox fillHeight="false" prefHeight="200.0" prefWidth="600.0" VBox.vgrow="ALWAYS">
<children>
<TitledPane fx:id="entriesPane" collapsible="false" text="Zip-entries" HBox.hgrow="ALWAYS">
<font>
<Font size="14.0"/>
</font>
<content>
<ListView fx:id="entryList" prefWidth="300.0"/>
</content>
</TitledPane>
<TitledPane fx:id="metadataPane" collapsible="false" layoutX="10.0" layoutY="10.0" prefWidth="300.0"
text="Metadata" HBox.hgrow="ALWAYS">
<font>
<Font size="14.0"/>
</font>
<content>
<HBox>
<children>
<VBox spacing="5.0">
<children>
<Label fx:id="subpathLbl" alignment="CENTER" text="Subpath:">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="erroneousLbl" text="Erroneous:">
<font>
<Font size="14.0"/>
</font>
<padding>
<Insets top="7.0"/>
</padding>
</Label>
<Label fx:id="filesizeLbl" text="Filesize:">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="validatedLbl" layoutX="10.0" layoutY="67.0" text="Validated:">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="objectCountLbl" layoutX="10.0" layoutY="67.0"
text="Object count:">
<font>
<Font size="14.0"/>
</font>
</Label>
</children>
</VBox>
<VBox prefHeight="147.0" prefWidth="189.0" spacing="5.0">
<children>
<TextField fx:id="subpathValueTxt" editable="false" prefHeight="27.0"
prefWidth="184.0" text="N/A"/>
<Label fx:id="erroneousValue" text="N/A">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="filesizeValue" text="N/A">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="validatedValue" layoutX="15.0" layoutY="67.0" text="N/A">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="objectCountValue" layoutX="15.0" layoutY="92.0" text="N/A">
<font>
<Font size="14.0"/>
</font>
</Label>
</children>
<padding>
<Insets left="5.0"/>
</padding>
</VBox>
</children>
</HBox>
</content>
</TitledPane>
</children>
</HBox>
<HBox spacing="5.0">
<children>
<StackPane HBox.hgrow="ALWAYS">
<children>
<ProgressBar fx:id="progress" maxWidth="1.7976931348623157E308" minHeight="40.0"
prefHeight="40.0" progress="0.0">
<padding>
<Insets bottom="5.0" right="5.0" top="5.0"/>
</padding>
</ProgressBar>
<ProgressBar fx:id="subProgress" prefHeight="11.0" prefWidth="520.0" progress="0.0"
StackPane.alignment="CENTER_LEFT"/>
</children>
</StackPane>
<Button fx:id="cancelBtn" alignment="CENTER" mnemonicParsing="false" text="Cancel">
<font>
<Font size="14.0"/>
</font>
<HBox.margin>
<Insets top="4.0"/>
</HBox.margin>
</Button>
</children>
<padding>
<Insets left="5.0" right="5.0"/>
</padding>
</HBox>
</children>
</VBox>
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId>
<version>3.16.0</version>
<version>3.17.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>CityDoctorHealer</artifactId>
<dependencies>
<dependency>
<groupId>de.hft.stuttgart</groupId>
......@@ -37,9 +39,12 @@
<extensions>true</extensions>
<configuration>
<javahClassNames>
<javahClassName>de.hft.stuttgart.citydoctor2.connect.edge.CppFeature</javahClassName>
<javahClassName>de.hft.stuttgart.citydoctor2.CppInitializer</javahClassName>
<javahClassName>de.hft.stuttgart.citydoctor2.connect.edge.CppHealResult</javahClassName>
<javahClassName>
de.hft.stuttgart.citydoctor2.connect.edge.CppFeature</javahClassName>
<javahClassName>
de.hft.stuttgart.citydoctor2.CppInitializer</javahClassName>
<javahClassName>
de.hft.stuttgart.citydoctor2.connect.edge.CppHealResult</javahClassName>
</javahClassNames>
</configuration>
</plugin>
......
......@@ -36,7 +36,6 @@ public class HealMainBuilding implements HealingMethod {
}
logger.debug("Executing Repair for AttributeMissingError with message Main Building");
Building b = (Building) err.getFeature();
System.out.println("Building: " + b.getGmlId());
BuildingPart largestPart = null;
double largestArea = 0;
for (BuildingPart part : b.getBuildingParts()) {
......@@ -58,7 +57,6 @@ public class HealMainBuilding implements HealingMethod {
// no suitable part found
return false;
}
System.out.println("Part: " + largestPart.getGmlId() + " has area: " + largestArea);
b.getBuildingParts().remove(largestPart);
var gmlBuilding = (org.citygml4j.core.model.building.Building) b.getGmlObject();
BuildingPartProperty buildingPartProp = findBuildingPartProp(largestPart, gmlBuilding);
......
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId>
<version>3.16.0</version>
<version>3.17.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>CityDoctorHealerGUI</artifactId>
......@@ -23,6 +26,14 @@
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorAutoPro</artifactId>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
......
......@@ -4,7 +4,7 @@
<parent>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId>
<version>3.16.0</version>
<version>3.17.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>CityDoctorHealerGenetic</artifactId>
......
localhost:5432:*:postgres:admin
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId>
<version>3.16.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>CityDoctorWebService</artifactId>
<packaging>war</packaging>
<name>CityDoctorWebService</name>
<dependencies>
<dependency>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorModel</artifactId>
</dependency>
<dependency>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorValidation</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180813</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.6</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.29</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>2.29</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.29</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>2.29</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
</dependencies>
<build>
<finalName>CityDoctorWebService</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package de.hft.stuttgart.citydoctor2.webservice;
public class AuthenticationException extends Exception {
private static final long serialVersionUID = 1734788211196618632L;
public AuthenticationException() {
super();
}
public AuthenticationException(String message, Throwable cause, boolean enableSuppression,
boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
public AuthenticationException(String message, Throwable cause) {
super(message, cause);
}
public AuthenticationException(String message) {
super(message);
}
public AuthenticationException(Throwable cause) {
super(cause);
}
}
package de.hft.stuttgart.citydoctor2.webservice;
import javax.ws.rs.ApplicationPath;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.server.ResourceConfig;
import de.hft.stuttgart.citydoctor2.webservice.endpoints.BuildingEndpoint;
import de.hft.stuttgart.citydoctor2.webservice.endpoints.ChecksEndpoint;
import de.hft.stuttgart.citydoctor2.webservice.endpoints.LoginEndpoint;
import de.hft.stuttgart.citydoctor2.webservice.endpoints.LogoutEndpoint;
import de.hft.stuttgart.citydoctor2.webservice.endpoints.ModelsEndpoint;
import de.hft.stuttgart.citydoctor2.webservice.endpoints.RegisterEndpoint;
import de.hft.stuttgart.citydoctor2.webservice.endpoints.ValidationEndpoint;
@ApplicationPath("/rest")
public class CityDoctorWebService extends ResourceConfig {
public CityDoctorWebService() {
register(LoginEndpoint.class);
register(RegisterEndpoint.class);
register(ModelsEndpoint.class);
register(MultiPartFeature.class);
register(BuildingEndpoint.class);
register(ValidationEndpoint.class);
register(LogoutEndpoint.class);
register(ChecksEndpoint.class);
}
}
package de.hft.stuttgart.citydoctor2.webservice;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Enumeration;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import de.hft.stuttgart.citydoctor2.webservice.database.ModelQueries;
import de.hft.stuttgart.citydoctor2.webservice.utils.HibernateUtils;
@WebListener
public class ServletInitListener implements ServletContextListener {
private static Logger logger = LogManager.getLogger(ServletInitListener.class);
@Override
public void contextInitialized(ServletContextEvent sce) {
HibernateUtils.init();
logger.info("Removing models in state 'parsing'");
ModelQueries.cleanup();
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
HibernateUtils.shutdown();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Enumeration<Driver> drivers = DriverManager.getDrivers();
while (drivers.hasMoreElements()) {
Driver driver = drivers.nextElement();
if (driver.getClass().getClassLoader() == cl) {
try {
DriverManager.deregisterDriver(driver);
logger.info("Deregistering JDBC driver: {}", driver);
} catch (SQLException e) {
logger.error("Error deregistering driver {}", driver);
logger.error("", e);
}
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment