added persistence functionality (JPA with Hibernate ORM and PostgreSQL JDBC driver) to save hits data to postgres database
This commit is contained in:
parent
638916a160
commit
8e6d912eea
88 changed files with 101 additions and 14 deletions
8
.idea/artifacts/web_lab3_ear_exploded.xml
Normal file
8
.idea/artifacts/web_lab3_ear_exploded.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<component name="ArtifactManager">
|
||||
<artifact type="exploded-ear" name="web-lab3:ear exploded">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/web_lab3_ear_exploded</output-path>
|
||||
<root id="root">
|
||||
<element id="javaee-facet-resources" facet="web-lab3/javaeeApplication/javaEEApplication" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
8
.idea/artifacts/web_lab3_main_ear_exploded.xml
Normal file
8
.idea/artifacts/web_lab3_main_ear_exploded.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<component name="ArtifactManager">
|
||||
<artifact type="exploded-ear" name="web-lab3.main:ear exploded">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/web_lab3_main_ear_exploded</output-path>
|
||||
<root id="root">
|
||||
<element id="javaee-facet-resources" facet="web-lab3.main/javaeeApplication/javaEEApplication" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
12
.idea/dataSources.xml
Normal file
12
.idea/dataSources.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="helios postgres" uuid="1d89802b-1b14-4f1f-bdf1-c835d25f1fd2">
|
||||
<driver-ref>postgresql</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:postgresql://pg:5432/studs</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
16
.idea/deployment.xml
Normal file
16
.idea/deployment.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
||||
<serverData>
|
||||
<paths name="helios">
|
||||
<serverdata>
|
||||
<mappings>
|
||||
<mapping deploy="web\lab3\main" local="$PROJECT_DIR$/src/main" web="web\lab3\main" />
|
||||
<mapping deploy="web\lab3\test" local="$PROJECT_DIR$/src/test" web="web\lab3\test" />
|
||||
<mapping deploy="web\lab3" local="$PROJECT_DIR$" web="web\lab3" />
|
||||
</mappings>
|
||||
</serverdata>
|
||||
</paths>
|
||||
</serverData>
|
||||
</component>
|
||||
</project>
|
5
.idea/modules/META-INF/orm.xml
Normal file
5
.idea/modules/META-INF/orm.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity-mappings xmlns="https://jakarta.ee/xml/ns/persistence/orm"
|
||||
version="3.0">
|
||||
|
||||
</entity-mappings>
|
9
.idea/modules/META-INF/persistence.xml
Normal file
9
.idea/modules/META-INF/persistence.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
|
||||
version="3.0">
|
||||
<persistence-unit name="default">
|
||||
|
||||
</persistence-unit>
|
||||
</persistence>
|
14
.idea/webServers.xml
Normal file
14
.idea/webServers.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WebServers">
|
||||
<option name="servers">
|
||||
<webServer id="c14c7a48-1f31-4ae7-816f-cf7bb40354cf" name="helios" url="http://helios.se.ifmo.ru">
|
||||
<fileTransfer rootFolder="/home/studs/s316304" accessType="SFTP" host="helios.se.ifmo.ru" port="2222" sshConfigId="d2a90d61-c2d5-41f1-bfff-50b7f6ebca77" sshConfig="s316304@helios.se.ifmo.ru:2222 password">
|
||||
<advancedOptions>
|
||||
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
|
||||
</advancedOptions>
|
||||
</fileTransfer>
|
||||
</webServer>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
BIN
lib/cdi-api-javadoc.jar
Normal file
BIN
lib/cdi-api-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/cdi-api-sources.jar
Normal file
BIN
lib/cdi-api-sources.jar
Normal file
Binary file not shown.
BIN
lib/cdi-api.jar
Normal file
BIN
lib/cdi-api.jar
Normal file
Binary file not shown.
BIN
lib/weld-api-javadoc.jar
Normal file
BIN
lib/weld-api-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/weld-api-sources.jar
Normal file
BIN
lib/weld-api-sources.jar
Normal file
Binary file not shown.
BIN
lib/weld-api.jar
Normal file
BIN
lib/weld-api.jar
Normal file
Binary file not shown.
BIN
lib/weld-core-impl-javadoc.jar
Normal file
BIN
lib/weld-core-impl-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/weld-core-impl-sources.jar
Normal file
BIN
lib/weld-core-impl-sources.jar
Normal file
Binary file not shown.
BIN
lib/weld-core-impl.jar
Normal file
BIN
lib/weld-core-impl.jar
Normal file
Binary file not shown.
BIN
lib/weld-core-javadoc.jar
Normal file
BIN
lib/weld-core-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/weld-core-jsf-javadoc.jar
Normal file
BIN
lib/weld-core-jsf-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/weld-core-jsf-sources.jar
Normal file
BIN
lib/weld-core-jsf-sources.jar
Normal file
Binary file not shown.
BIN
lib/weld-core-jsf.jar
Normal file
BIN
lib/weld-core-jsf.jar
Normal file
Binary file not shown.
BIN
lib/weld-core-sources.jar
Normal file
BIN
lib/weld-core-sources.jar
Normal file
Binary file not shown.
BIN
lib/weld-core.jar
Normal file
BIN
lib/weld-core.jar
Normal file
Binary file not shown.
BIN
lib/weld-se-core-javadoc.jar
Normal file
BIN
lib/weld-se-core-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/weld-se-core-sources.jar
Normal file
BIN
lib/weld-se-core-sources.jar
Normal file
Binary file not shown.
BIN
lib/weld-se-core.jar
Normal file
BIN
lib/weld-se-core.jar
Normal file
Binary file not shown.
BIN
lib/weld-se-sources.jar
Normal file
BIN
lib/weld-se-sources.jar
Normal file
Binary file not shown.
BIN
lib/weld-se.jar
Normal file
BIN
lib/weld-se.jar
Normal file
Binary file not shown.
BIN
lib/weld-servlet-core-javadoc.jar
Normal file
BIN
lib/weld-servlet-core-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/weld-servlet-core-sources.jar
Normal file
BIN
lib/weld-servlet-core-sources.jar
Normal file
Binary file not shown.
BIN
lib/weld-servlet-core.jar
Normal file
BIN
lib/weld-servlet-core.jar
Normal file
Binary file not shown.
BIN
lib/weld-servlet-javadoc.jar
Normal file
BIN
lib/weld-servlet-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/weld-servlet-sources.jar
Normal file
BIN
lib/weld-servlet-sources.jar
Normal file
Binary file not shown.
BIN
lib/weld-servlet.jar
Normal file
BIN
lib/weld-servlet.jar
Normal file
Binary file not shown.
BIN
lib/weld-spi-javadoc.jar
Normal file
BIN
lib/weld-spi-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/weld-spi-sources.jar
Normal file
BIN
lib/weld-spi-sources.jar
Normal file
Binary file not shown.
BIN
lib/weld-spi.jar
Normal file
BIN
lib/weld-spi.jar
Normal file
Binary file not shown.
7
src/main/META-INF/application.xml
Normal file
7
src/main/META-INF/application.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<application xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_8.xsd"
|
||||
version="8">
|
||||
|
||||
</application>
|
BIN
src/main/lib/FastInfoset-1.2.15.jar
Normal file
BIN
src/main/lib/FastInfoset-1.2.15.jar
Normal file
Binary file not shown.
BIN
src/main/lib/antlr-2.7.7.jar
Normal file
BIN
src/main/lib/antlr-2.7.7.jar
Normal file
Binary file not shown.
BIN
src/main/lib/byte-buddy-1.10.7.jar
Normal file
BIN
src/main/lib/byte-buddy-1.10.7.jar
Normal file
Binary file not shown.
BIN
src/main/lib/cdi-api-javadoc.jar
Normal file
BIN
src/main/lib/cdi-api-javadoc.jar
Normal file
Binary file not shown.
BIN
src/main/lib/cdi-api-sources.jar
Normal file
BIN
src/main/lib/cdi-api-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/cdi-api.jar
Normal file
BIN
src/main/lib/cdi-api.jar
Normal file
Binary file not shown.
BIN
src/main/lib/classmate-1.5.1.jar
Normal file
BIN
src/main/lib/classmate-1.5.1.jar
Normal file
Binary file not shown.
BIN
src/main/lib/dom4j-2.1.1.jar
Normal file
BIN
src/main/lib/dom4j-2.1.1.jar
Normal file
Binary file not shown.
BIN
src/main/lib/hibernate-commons-annotations-5.1.0.Final.jar
Normal file
BIN
src/main/lib/hibernate-commons-annotations-5.1.0.Final.jar
Normal file
Binary file not shown.
BIN
src/main/lib/hibernate-core-5.4.11.Final.jar
Normal file
BIN
src/main/lib/hibernate-core-5.4.11.Final.jar
Normal file
Binary file not shown.
BIN
src/main/lib/istack-commons-runtime-3.0.7.jar
Normal file
BIN
src/main/lib/istack-commons-runtime-3.0.7.jar
Normal file
Binary file not shown.
BIN
src/main/lib/jandex-2.1.1.Final.jar
Normal file
BIN
src/main/lib/jandex-2.1.1.Final.jar
Normal file
Binary file not shown.
BIN
src/main/lib/javassist-3.24.0-GA.jar
Normal file
BIN
src/main/lib/javassist-3.24.0-GA.jar
Normal file
Binary file not shown.
BIN
src/main/lib/javax.activation-api-1.2.0.jar
Normal file
BIN
src/main/lib/javax.activation-api-1.2.0.jar
Normal file
Binary file not shown.
BIN
src/main/lib/javax.persistence-api-2.2.jar
Normal file
BIN
src/main/lib/javax.persistence-api-2.2.jar
Normal file
Binary file not shown.
BIN
src/main/lib/jaxb-api-2.3.1.jar
Normal file
BIN
src/main/lib/jaxb-api-2.3.1.jar
Normal file
Binary file not shown.
BIN
src/main/lib/jaxb-runtime-2.3.1.jar
Normal file
BIN
src/main/lib/jaxb-runtime-2.3.1.jar
Normal file
Binary file not shown.
BIN
src/main/lib/jboss-logging-3.3.2.Final.jar
Normal file
BIN
src/main/lib/jboss-logging-3.3.2.Final.jar
Normal file
Binary file not shown.
BIN
src/main/lib/jboss-transaction-api_1.2_spec-1.1.1.Final.jar
Normal file
BIN
src/main/lib/jboss-transaction-api_1.2_spec-1.1.1.Final.jar
Normal file
Binary file not shown.
BIN
src/main/lib/stax-ex-1.8.jar
Normal file
BIN
src/main/lib/stax-ex-1.8.jar
Normal file
Binary file not shown.
BIN
src/main/lib/txw2-2.3.1.jar
Normal file
BIN
src/main/lib/txw2-2.3.1.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-api-javadoc.jar
Normal file
BIN
src/main/lib/weld-api-javadoc.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-api-sources.jar
Normal file
BIN
src/main/lib/weld-api-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-api.jar
Normal file
BIN
src/main/lib/weld-api.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-core-impl-javadoc.jar
Normal file
BIN
src/main/lib/weld-core-impl-javadoc.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-core-impl-sources.jar
Normal file
BIN
src/main/lib/weld-core-impl-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-core-impl.jar
Normal file
BIN
src/main/lib/weld-core-impl.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-core-javadoc.jar
Normal file
BIN
src/main/lib/weld-core-javadoc.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-core-jsf-javadoc.jar
Normal file
BIN
src/main/lib/weld-core-jsf-javadoc.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-core-jsf-sources.jar
Normal file
BIN
src/main/lib/weld-core-jsf-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-core-jsf.jar
Normal file
BIN
src/main/lib/weld-core-jsf.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-core-sources.jar
Normal file
BIN
src/main/lib/weld-core-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-core.jar
Normal file
BIN
src/main/lib/weld-core.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-se-core-javadoc.jar
Normal file
BIN
src/main/lib/weld-se-core-javadoc.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-se-core-sources.jar
Normal file
BIN
src/main/lib/weld-se-core-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-se-core.jar
Normal file
BIN
src/main/lib/weld-se-core.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-se-sources.jar
Normal file
BIN
src/main/lib/weld-se-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-se.jar
Normal file
BIN
src/main/lib/weld-se.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-servlet-core-javadoc.jar
Normal file
BIN
src/main/lib/weld-servlet-core-javadoc.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-servlet-core-sources.jar
Normal file
BIN
src/main/lib/weld-servlet-core-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-servlet-core.jar
Normal file
BIN
src/main/lib/weld-servlet-core.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-servlet-javadoc.jar
Normal file
BIN
src/main/lib/weld-servlet-javadoc.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-servlet-sources.jar
Normal file
BIN
src/main/lib/weld-servlet-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-servlet.jar
Normal file
BIN
src/main/lib/weld-servlet.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-spi-javadoc.jar
Normal file
BIN
src/main/lib/weld-spi-javadoc.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-spi-sources.jar
Normal file
BIN
src/main/lib/weld-spi-sources.jar
Normal file
Binary file not shown.
BIN
src/main/lib/weld-spi.jar
Normal file
BIN
src/main/lib/weld-spi.jar
Normal file
Binary file not shown.
|
@ -3,5 +3,5 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
||||
http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
|
||||
bean-discovery-mode="all">
|
||||
bean-discovery-mode="annotated">
|
||||
</beans>
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
|
||||
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"
|
||||
version="2.2">
|
||||
<persistence-unit name="default">
|
||||
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
|
||||
version="3.0">
|
||||
<persistence-unit name="default">
|
||||
|
||||
</persistence-unit>
|
||||
</persistence-unit>
|
||||
</persistence>
|
||||
|
|
15
src/main/resources/hibernate.cfg.xml
Normal file
15
src/main/resources/hibernate.cfg.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!DOCTYPE hibernate-configuration PUBLIC
|
||||
"-//Hibernate/Hibernate Configuration DTD//EN"
|
||||
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
|
||||
<hibernate-configuration>
|
||||
<session-factory>
|
||||
<property name="connection.url"/>
|
||||
<property name="connection.driver_class"/>
|
||||
<!-- <property name="connection.username"/> -->
|
||||
<!-- <property name="connection.password"/> -->
|
||||
|
||||
<!-- DB schema will be updated if needed -->
|
||||
<!-- <property name="hibernate.hbm2ddl.auto">update</property> -->
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
||||
http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
|
||||
bean-discovery-mode="annotated">
|
||||
</beans>
|
Loading…
Reference in a new issue