Skip to content

Commit 10446cc

Browse files
author
Vitalii
committed
attempt to create e-shop based on JEE tech stack
1 parent 86bb564 commit 10446cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3711
-0
lines changed
13.7 KB
Binary file not shown.
37.8 KB
Loading
18.8 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Class-Path:
3+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
3+
<display-name>InternetShop</display-name>
4+
5+
<servlet>
6+
<servlet-name>EnterPointWicket</servlet-name>
7+
<servlet-class>org.apache.wicket.protocol.http.WicketServlet</servlet-class>
8+
<init-param>
9+
<param-name>applicationClassName</param-name>
10+
<param-value>utility.Application</param-value>
11+
</init-param>
12+
<load-on-startup>1</load-on-startup>
13+
</servlet>
14+
15+
<servlet-mapping>
16+
<servlet-name>EnterPointWicket</servlet-name>
17+
<url-pattern>/*</url-pattern>
18+
</servlet-mapping>
19+
20+
</web-app>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<SETTINGS>
2+
<PATH_TO_DATABASE>
3+
D:\eclipse_workspace\InternetShop\Information\DataBase\server_data.gdb
4+
</PATH_TO_DATABASE>
5+
</SETTINGS>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package database;
2+
3+
import org.hibernate.Session;
4+
5+
import utility.Loader;
6+
7+
import database.firebird.HibernateFirebirdConnect;
8+
9+
/** êëàññ, êîòîðûé âûäàåò Session */
10+
public class Connector {
11+
static{
12+
try{
13+
Loader loader=new Loader("c:\\settings.xml");
14+
HibernateFirebirdConnect.open(loader.getString("//SETTINGS/PATH_TO_DATABASE", "").trim(), "SYSDBA", "masterkey", 50);
15+
//HibernateFirebirdConnect.open("D:\\eclipse_workspace\\InternetShop\\Information\\DataBase\\server_data.GDB", "SYSDBA", "masterkey", 50);
16+
}catch(Exception ex){
17+
System.out.println("File settings.xml is not found: "+ex.getMessage());
18+
}
19+
}
20+
21+
public static Session getSession(){
22+
return HibernateFirebirdConnect.getSession();
23+
}
24+
25+
public static void close(){
26+
HibernateFirebirdConnect.close();
27+
}
28+
}

0 commit comments

Comments
 (0)