From 40d4a40cbfda7439e50dc2f37b7ab90b5876c1f2 Mon Sep 17 00:00:00 2001 From: ulrich <undisclosed> Date: Fri, 23 Feb 2018 07:56:14 +0000 Subject: [PATCH] Einstellungen fuer die Datenbank-Konfiguration ergaenzt --- web/WEB-INF/web.xml | 4 ++++ web/WEB-INF/create_database.sql | 13 +++++++++++++ web/META-INF/context.xml | 14 +++++++++++++- 3 files changed, 30 insertions(+), 1 deletions(-) diff --git a/web/META-INF/context.xml b/web/META-INF/context.xml index b7dea95..d971e06 100644 --- a/web/META-INF/context.xml +++ b/web/META-INF/context.xml @@ -1,2 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<Context path="/radiozentrale"/> +<Context path="/radiozentrale"> + <Resource name="jdbc/RadioDB" + auth="Container" + type="javax.sql.DataSource" + username="dbadmin" + password="changeit" + driverClassName="org.apache.derby.jdbc.ClientDriver" + url="jdbc:derby://127.0.0.1:1528/radio;create=true" + maxActive="60" + maxIdle="30" + maxWait="5000" + /> +</Context> diff --git a/web/WEB-INF/create_database.sql b/web/WEB-INF/create_database.sql index 7aeb910..9e596d0 100644 --- a/web/WEB-INF/create_database.sql +++ b/web/WEB-INF/create_database.sql @@ -9,9 +9,22 @@ ); create index sname on app.sender (sender_name); +create table app.abspieler +( + abs_id int not null, + abs_name varchar(1024) not null, + abs_url varchar(1024), + abs_typ varchar(1024), + abs_bild varchar(1024), + abs_zustand varchar(1024), + primary key (sender_id) +); +create index sname on app.sender (sender_name); + create table app.keytable ( key_name varchar(80) not null primary key, key_next int ); create index key_name_next ON app.keytable (key_name,key_next); insert into app.keytable (key_name, key_next) values ('sender_id',1); +insert into app.keytable (key_name, key_next) values ('abs_id',1); \ No newline at end of file diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml index 573d8ad..10e1198 100644 --- a/web/WEB-INF/web.xml +++ b/web/WEB-INF/web.xml @@ -2,6 +2,10 @@ <web-app version="3.1" 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/web-app_3_1.xsd"> <description>Webradio</description> <display-name>Radiozentrale</display-name> + <context-param> + <param-name>dsname</param-name> + <param-value>jdbc/RadioDB</param-value> + </context-param> <session-config> <session-timeout> 30 -- Gitblit v1.9.3